summaryrefslogtreecommitdiff
path: root/async.c
diff options
context:
space:
mode:
authorMichael Grunder <michael.grunder@gmail.com>2020-07-31 13:23:28 -0700
committerGitHub <noreply@github.com>2020-07-31 13:23:28 -0700
commit5003906d633dd4b96a3a60d1f63188ffaca3140e (patch)
tree268d748dc7824c4933e425d875021fdd600c7c4b /async.c
parentea063b7cc895131c6f2955351e8ea5b9d0a48048 (diff)
Define a no op assert if we detect NDEBUG (#861)
Addresses #642
Diffstat (limited to 'async.c')
-rw-r--r--async.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/async.c b/async.c
index 020cb09..18a4a09 100644
--- a/async.c
+++ b/async.c
@@ -47,6 +47,11 @@
#include "async_private.h"
+#ifdef NDEBUG
+#undef assert
+#define assert(e) (void)(e)
+#endif
+
/* Forward declarations of hiredis.c functions */
int __redisAppendCommand(redisContext *c, const char *cmd, size_t len);
void __redisSetError(redisContext *c, int type, const char *str);