mirror of
https://github.com/opnsense/src.git
synced 2026-02-22 09:21:31 -05:00
libc binuptime(): use the right function to get the most significant bit index
Reported and tested by: Jaroslaw Pelczar <jarek@jpelczar.com> PR: 261781 Sponsored by: The FreeBSD Foundation MFC after: 1 week
This commit is contained in:
parent
14a15342bb
commit
a1f9326607
1 changed files with 2 additions and 2 deletions
|
|
@ -83,9 +83,9 @@ binuptime(struct bintime *bt, struct vdso_timekeep *tk, bool abs)
|
|||
return (error);
|
||||
scale = th->th_scale;
|
||||
#ifdef _LP64
|
||||
scale_bits = ffsl(scale);
|
||||
scale_bits = flsl(scale);
|
||||
#else
|
||||
scale_bits = ffsll(scale);
|
||||
scale_bits = flsll(scale);
|
||||
#endif
|
||||
if (__predict_false(scale_bits + fls(delta) > 63)) {
|
||||
x = (scale >> 32) * delta;
|
||||
|
|
|
|||
Loading…
Reference in a new issue