summaryrefslogtreecommitdiff
path: root/src/journal
diff options
context:
space:
mode:
authorCristian Rodríguez <crrodriguez@opensuse.org>2013-04-04 20:09:50 -0300
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-05 00:17:35 -0400
commit144e51eca20b72c8177314c225d8c15c1b0b9d6b (patch)
treee7cbe68e619a5cae506318edc7489469c61451fe /src/journal
parente8853816bf197afc71819e28f1316a5d5ee4b4c3 (diff)
journal: u64log2 can be expressed just as __builtin_clzll(n) ^ 63U
Diffstat (limited to 'src/journal')
-rw-r--r--src/journal/journald-rate-limit.c15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/journal/journald-rate-limit.c b/src/journal/journald-rate-limit.c
index 8bd68476a3..da3aed64ea 100644
--- a/src/journal/journald-rate-limit.c
+++ b/src/journal/journald-rate-limit.c
@@ -170,21 +170,6 @@ fail:
return NULL;
}
-static uint64_t u64log2(uint64_t n) {
- unsigned r;
-
- if (n <= 1)
- return 0;
-
- r = 0;
- for (;;) {
- n = n >> 1;
- if (!n)
- return r;
- r++;
- }
-}
-
static unsigned burst_modulate(unsigned burst, uint64_t available) {
unsigned k;