diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-07-26 01:04:31 +0200 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2016-08-02 02:55:42 +0200 |
commit | cc605ab76a8dd926a28a8e9b857fd09606a524f6 (patch) | |
tree | b6b374ab8c1dc77841807f0585a1e193361adc4f | |
parent | 7ac9f9195119295fa81313ea856f1bfec4c55fe7 (diff) |
timers: use more clear pow macro
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r-- | src/timers.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/timers.c b/src/timers.c index 636b851..ab9ada4 100644 --- a/src/timers.c +++ b/src/timers.c @@ -21,7 +21,7 @@ enum { /* This rounds the time down to the closest power of two of the closest quarter second. */ static inline unsigned long slack_time(unsigned long time) { - return time & ~(BIT_MASK(ilog2(HZ / 4) + 1) - 1); + return time & ~(roundup_pow_of_two(HZ / 4) - 1); } static void expired_retransmit_handshake(unsigned long ptr) |