Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libkern: avoid local var in order_base_2()
order_base_2(n) is implemented with a variable, which keeps it from being used at file scope. Implement it instead as ilog2(2*n-1), which produces a different result when 2*n overflows, which appears unlikely in practice. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D46826 (cherry picked from commit b7cbf741d55468ba34305a14ac3acc1c286af034)
- Loading branch information