Combine if conditions

License: MIT
Signed-off-by: default avatarJakub Sztandera <kubuxu@protocol.ai>
parent 8dc88590
......@@ -55,10 +55,7 @@ func (b *Buzhash) NextBytes() ([]byte, error) {
state = state ^ bytehash[buf[i]]
}
for ; state&buzMask != 0; i++ {
if i >= buzMax {
break
}
for ; state&buzMask != 0 && i < buzMax; i++ {
state = bits.RotateLeft32(state, 1) ^ bytehash[buf[i-32]] ^ bytehash[buf[i]]
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment