basic/util: rename u64log2 to log2u64

u64log2 was strangely named. We even have log2i and log2u right below
in that file.
This commit is contained in:
Zbigniew Jędrzejewski-Szmek
2021-11-26 15:29:06 +01:00
parent e6f48be8d4
commit 58c34be864
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -336,7 +336,7 @@ int drop_privileges(uid_t uid, gid_t gid, uint64_t keep_capabilities) {
/* Now upgrade the permitted caps we still kept to effective caps */
if (keep_capabilities != 0) {
cap_value_t bits[u64log2(keep_capabilities) + 1];
cap_value_t bits[log2u64(keep_capabilities) + 1];
_cleanup_cap_free_ cap_t d = NULL;
unsigned i, j = 0;
+1 -1
View File
@@ -22,7 +22,7 @@ void in_initrd_force(bool value);
int on_ac_power(void);
static inline unsigned u64log2(uint64_t n) {
static inline unsigned log2u64(uint64_t n) {
#if __SIZEOF_LONG_LONG__ == 8
return (n > 1) ? (unsigned) __builtin_clzll(n) ^ 63U : 0;
#else