From 700437a25cf6508326541c2a56c26d747b9f3f76 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 23 Sep 2015 20:56:35 +0200 Subject: Unify --- ber/int.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'ber/int.go') diff --git a/ber/int.go b/ber/int.go index a29e7dd..df48fa3 100644 --- a/ber/int.go +++ b/ber/int.go @@ -16,13 +16,11 @@ func UnmarshalInt(b []byte) (i int) { } func intLen(i int) (n int) { - for i > 127 { + for ; i > 127; i >>= 8 { n++ - i >>= 8 } - for i < -128 { + for ; i < -128; i >>= 8 { n++ - i >>= 8 } return n + 1 } -- cgit v1.2.3