diff options
author | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-01-29 13:16:57 +0100 |
---|---|---|
committer | Dimitri Staessens <dimitri.staessens@ugent.be> | 2018-01-29 13:16:57 +0100 |
commit | 0e35ffe3743f5e79decfaed8cf7a14ff3c4f26fd (patch) | |
tree | 05df875bceae51ba0c85a39377732a94c3040271 /src | |
parent | 7738a4c41193dc9a3b5a1eb2d88e54c00ba191ed (diff) | |
parent | 98a306ff278884bfcbea41b059f2467226a9ced9 (diff) | |
download | ouroboros-0e35ffe3743f5e79decfaed8cf7a14ff3c4f26fd.tar.gz ouroboros-0e35ffe3743f5e79decfaed8cf7a14ff3c4f26fd.zip |
Merge branch 'testing' into be
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/timerwheel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/timerwheel.c b/src/lib/timerwheel.c index 391e805b..60fa9cda 100644 --- a/src/lib/timerwheel.c +++ b/src/lib/timerwheel.c @@ -60,7 +60,7 @@ struct timerwheel { pthread_mutex_t lock; time_t resolution; - unsigned int elements; + size_t elements; }; static void tw_el_fini(struct tw_el * e) @@ -111,7 +111,7 @@ struct timerwheel * timerwheel_create(time_t resolution, struct timespec now = {0, 0}; struct timespec res_ts = {resolution / 1000, (resolution % 1000) * MILLION}; - unsigned long i; + size_t i; struct timerwheel * tw; @@ -126,7 +126,7 @@ struct timerwheel * timerwheel_create(time_t resolution, tw->elements = 1; - while (tw->elements < max_delay / resolution) + while (tw->elements < (size_t) max_delay / resolution) tw->elements <<= 1; tw->wheel = malloc(sizeof(*tw->wheel) * tw->elements); |