summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoramallia <me@antoniomallia.it>2017-06-15 20:33:23 +0100
committeramallia <me@antoniomallia.it>2017-06-15 20:33:23 +0100
commitb46413647fa0be35273b787bab687458e28dc584 (patch)
tree9e9dcabba3cc50e877c5224c57af16d728d90123
parent97cd8157f74674c722dd30360caac1f498fa72ef (diff)
Assert statement calls a function which has side effects
-rw-r--r--async.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/async.c b/async.c
index d955203..ac343b5 100644
--- a/async.c
+++ b/async.c
@@ -336,7 +336,8 @@ static void __redisAsyncDisconnect(redisAsyncContext *ac) {
if (ac->err == 0) {
/* For clean disconnects, there should be no pending callbacks. */
- assert(__redisShiftCallback(&ac->replies,NULL) == REDIS_ERR);
+ int ret = __redisShiftCallback(&ac->replies,NULL);
+ assert(ret == REDIS_ERR);
} else {
/* Disconnection is caused by an error, make sure that pending
* callbacks cannot call new commands. */