X-Git-Url: https://git.archive.openwrt.org/?a=blobdiff_plain;f=utils.h;h=4e14bcf5cda246c477fc4a8854bbe7c45db5e66a;hb=9905bd411c13ff151cf90ddf9ea3041c5f0e56fb;hp=7973b6fb3e3920b3598e02b94c9cf836ca2b391e;hpb=8663e9de716248bf72832aee70090f574b3ff5d2;p=project%2Fnetifd.git diff --git a/utils.h b/utils.h index 7973b6f..4e14bcf 100644 --- a/utils.h +++ b/utils.h @@ -98,10 +98,8 @@ static inline int fls(int x) x <<= 2; r -= 2; } - if (!(x & 0x80000000u)) { - x <<= 1; + if (!(x & 0x80000000u)) r -= 1; - } return r; } #endif