Skip to content

Commit

Permalink
bitops: Use non-bitops ctzl
Browse files Browse the repository at this point in the history
The use of ctz has already eliminated zero, and thus the difference
in edge conditions between the two routines is irrelevant.

Signed-off-by: Richard Henderson <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Blue Swirl <[email protected]>
  • Loading branch information
rth7680 authored and blueswirl committed Feb 16, 2013
1 parent 18331e7 commit 265ce4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion util/bitops.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ unsigned long find_next_bit(const unsigned long *addr, unsigned long size,
return result + size; /* Nope. */
}
found_middle:
return result + bitops_ctzl(tmp);
return result + ctzl(tmp);
}

/*
Expand Down

0 comments on commit 265ce4a

Please sign in to comment.