diff options
author | Nick Mathewson <nickm@torproject.org> | 2018-04-17 12:45:53 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2018-04-17 12:45:53 -0400 |
commit | 31fbbf2377846535848553938f6be233f3092702 (patch) | |
tree | 78ddb355864068b67adc6186d963821fa9ad11f6 /src | |
parent | 2bf6f1cd39c102749ee518664036c90ab1dbfc9c (diff) | |
download | tor-31fbbf2377846535848553938f6be233f3092702.tar.gz tor-31fbbf2377846535848553938f6be233f3092702.zip |
Fixup timing wheel warnings related to recent WHEEL_BIT change.
Diffstat (limited to 'src')
-rw-r--r-- | src/ext/timeouts/timeout.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ext/timeouts/timeout.c b/src/ext/timeouts/timeout.c index 713ec219ce..d4b514d2c5 100644 --- a/src/ext/timeouts/timeout.c +++ b/src/ext/timeouts/timeout.c @@ -150,7 +150,7 @@ #else #define ctz(n) ctz32(n) #define clz(n) clz32(n) -#define fls(n) ((int)(32 - clz32(n))) +#define fls(n) ((int)(32 - clz32((uint32_t)n))) #endif #if WHEEL_BIT == 6 @@ -432,7 +432,7 @@ TIMEOUT_PUBLIC void timeouts_update(struct timeouts *T, abstime_t curtime) { * or can be replaced with a simpler operation. */ oslot = WHEEL_MASK & (T->curtime >> (wheel * WHEEL_BIT)); - pending = rotl(((UINT64_C(1) << _elapsed) - 1), oslot); + pending = rotl(((WHEEL_C(1) << _elapsed) - 1), oslot); nslot = WHEEL_MASK & (curtime >> (wheel * WHEEL_BIT)); pending |= rotr(rotl(((WHEEL_C(1) << _elapsed) - 1), nslot), (int)_elapsed); |