aboutsummaryrefslogtreecommitdiff
path: root/ber/base128.go
diff options
context:
space:
mode:
Diffstat (limited to 'ber/base128.go')
-rw-r--r--ber/base128.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/ber/base128.go b/ber/base128.go
index 7e44d76..4777651 100644
--- a/ber/base128.go
+++ b/ber/base128.go
@@ -9,8 +9,7 @@ func base128(n int) (b []byte) {
l++
}
for i := l - 1; i >= 0; i-- {
- o := byte(n >> uint(i*7))
- o &= 0x7F
+ o := byte(n>>uint(i*7)) & 0x7f
if i != 0 {
o |= 0x80
}
@@ -24,7 +23,7 @@ func debase128(b []byte) (i, n int) {
i <<= 7
i |= int(v & 0x7f)
n++
- if v & 0x80 == 0 {
+ if v&0x80 == 0 {
return
}
}