Skip to content

Commit

Permalink
Remove unnecessary bound-check
Browse files Browse the repository at this point in the history
Signed-off-by: Aidar Fattakhov <[email protected]>
  • Loading branch information
AsGreyWolf committed Dec 5, 2024
1 parent dc644eb commit d212d41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openflow15/group.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func (g *GroupMod) UnmarshalBinary(data []byte) (err error) {
g.CommandBucketId = binary.BigEndian.Uint32(data[n:])
n += 4

for len(g.Buckets) < int(g.BucketArrayLen) && n < g.Header.Length {
for len(g.Buckets) < int(g.BucketArrayLen) {
bkt := new(Bucket)
err = bkt.UnmarshalBinary(data[n:])
if err != nil {
Expand Down

0 comments on commit d212d41

Please sign in to comment.