summaryrefslogtreecommitdiff
path: root/src/redisassert.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2013-08-19 14:54:31 +0200
committerantirez <antirez@gmail.com>2013-08-19 15:01:21 +0200
commit1c75408457841d94b2e9f6730861516555796341 (patch)
tree3b45f50e54aeac18de9ec76ca54e5e41d9887bb7 /src/redisassert.h
parentca294c6b1e515a7da42f8106ed4e596e649165ba (diff)
downloadredis-1c75408457841d94b2e9f6730861516555796341.tar.gz
assert.h replaced with redisassert.h when appropriate.
Also a warning was suppressed by including unistd.h in redisassert.h (needed for _exit()).
Diffstat (limited to 'src/redisassert.h')
-rw-r--r--src/redisassert.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/redisassert.h b/src/redisassert.h
index e2cf47cb5..e5825c0f5 100644
--- a/src/redisassert.h
+++ b/src/redisassert.h
@@ -38,7 +38,9 @@
#ifndef __REDIS_ASSERT_H__
#define __REDIS_ASSERT_H__
-#define redisAssert(_e) ((_e)?(void)0 : (_redisAssert(#_e,__FILE__,__LINE__),_exit(1)))
+#include <unistd.h> /* for _exit() */
+
+#define assert(_e) ((_e)?(void)0 : (_redisAssert(#_e,__FILE__,__LINE__),_exit(1)))
void _redisAssert(char *estr, char *file, int line);