Skip to content
This repository was archived by the owner on Jun 20, 2023. It is now read-only.

Commit 29aeb2c

Browse files
committed
Combine if conditions
License: MIT Signed-off-by: Jakub Sztandera <[email protected]>
1 parent 8dc8859 commit 29aeb2c

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

buzhash.go

+1-4
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,7 @@ func (b *Buzhash) NextBytes() ([]byte, error) {
5555
state = state ^ bytehash[buf[i]]
5656
}
5757

58-
for ; state&buzMask != 0; i++ {
59-
if i >= buzMax {
60-
break
61-
}
58+
for ; state&buzMask != 0 && i < buzMax; i++ {
6259
state = bits.RotateLeft32(state, 1) ^ bytehash[buf[i-32]] ^ bytehash[buf[i]]
6360
}
6461

0 commit comments

Comments
 (0)