From: Guus Sliepen Date: Wed, 30 Oct 2019 18:21:09 +0000 (+0100) Subject: Fix another case of assert() with side-effects. X-Git-Url: http://git.meshlink.io/?p=meshlink;a=commitdiff_plain;h=02beca7acb7a6d2ecba71540bab1a53e17838d6a Fix another case of assert() with side-effects. --- diff --git a/src/event.c b/src/event.c index f72529ef..3c2306bd 100644 --- a/src/event.c +++ b/src/event.c @@ -71,7 +71,8 @@ void io_add(event_loop_t *loop, io_t *io, io_cb_t cb, void *data, int fd, int fl io_set(loop, io, flags); - assert(splay_insert_node(&loop->ios, &io->node)); + splay_node_t *node = splay_insert_node(&loop->ios, &io->node); + assert(node); } void io_set(event_loop_t *loop, io_t *io, int flags) {