Commit 9bee384b authored by william's avatar william

fix add() in bench-heap.c

parent d40d1092
......@@ -173,7 +173,7 @@ static void init(struct timeout *timeout, size_t count) {
static void add(struct timeout *to, timeout_t expires) {
min_heap_erase(&timeouts, to);
to->expires = expires;
to->expires = curtime + expires;
if (0 != min_heap_push(&timeouts, to))
err(1, "realloc");
} /* add() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment