mirror of
https://github.com/opnsense/src.git
synced 2026-06-08 16:22:46 -04:00
x86: use order_base_2
Use order_base_2 in place of expressions involving fls. Reviewed by: alc, markj Differential Revision: https://reviews.freebsd.org/D45536
This commit is contained in:
parent
0839258c56
commit
5dbf886104
2 changed files with 2 additions and 2 deletions
|
|
@ -67,7 +67,7 @@ static __inline int
|
|||
log2(u_int x)
|
||||
{
|
||||
|
||||
return (x == 0 ? -1 : fls(x - 1));
|
||||
return (x == 0 ? -1 : order_base_2(x));
|
||||
}
|
||||
|
||||
int
|
||||
|
|
|
|||
|
|
@ -189,7 +189,7 @@ static __inline int
|
|||
mask_width(u_int x)
|
||||
{
|
||||
|
||||
return (x == 0 ? -1 : fls(x - 1));
|
||||
return (x == 0 ? -1 : order_base_2(x));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue