fixed off by one error
This commit is contained in:
1 parent
7710a286ca
commit
ffa6450695
1 file changed
+1
-1
@@ -152,7 +152,7 @@ static u_int get_nearest_powerof2(u_int n)
|
|||||||
{
|
{
|
||||||
u_int i;
|
u_int i;
|
||||||
--n;
|
--n;
|
||||||
for (--n, i = 1; i < sizeof(u_int) * 8; i <<= 1)
|
for (i = 1; i < sizeof(u_int) * 8; i <<= 1)
|
||||||
{
|
{
|
||||||
n |= n >> i;
|
n |= n >> i;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user