chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
72b7d99
)
shared/util: drop duplicate log2u64 function
author
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 4 Feb 2015 14:39:36 +0000
(09:39 -0500)
committer
Zbigniew Jędrzejewski-Szmek
<zbyszek@in.waw.pl>
Wed, 4 Feb 2015 15:27:09 +0000
(10:27 -0500)
src/shared/util.h
patch
|
blob
|
history
diff --git
a/src/shared/util.h
b/src/shared/util.h
index 7dfabbc07d7701802790921e690fb805b83e0e25..b56ffbde45657c3121c82450c6330c53afde3153 100644
(file)
--- a/
src/shared/util.h
+++ b/
src/shared/util.h
@@
-872,16
+872,6
@@
static inline unsigned log2u(unsigned x) {
return sizeof(unsigned) * 8 - __builtin_clz(x) - 1;
}
-static inline unsigned log2u64(uint64_t x) {
- assert(x > 0);
-
-#if __SIZEOF_LONG_LONG__ == 8
- return 64 - __builtin_clzll(x) - 1;
-#else
-#error "Wut?"
-#endif
-}
-
static inline unsigned log2u_round_up(unsigned x) {
assert(x > 0);