diff options
author | antirez <antirez@gmail.com> | 2013-08-19 14:54:31 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-08-19 15:02:44 +0200 |
commit | e16dd1d86b84b22d30f22b8b6fef3a60c5861346 (patch) | |
tree | 3a993c24753958f7d357ce47eb2f5ea7eafb6cb2 /src | |
parent | 85070a30443b313bc88d5d7df63b302297c7cf97 (diff) | |
download | redis-e16dd1d86b84b22d30f22b8b6fef3a60c5861346.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')
-rw-r--r-- | src/dict.c | 2 | ||||
-rw-r--r-- | src/pqsort.c | 1 | ||||
-rw-r--r-- | src/redisassert.h | 4 | ||||
-rw-r--r-- | src/ziplist.c | 2 | ||||
-rw-r--r-- | src/zipmap.c | 1 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/dict.c b/src/dict.c index a534ddee8..d2ff4a9ac 100644 --- a/src/dict.c +++ b/src/dict.c @@ -39,13 +39,13 @@ #include <stdlib.h> #include <string.h> #include <stdarg.h> -#include <assert.h> #include <limits.h> #include <sys/time.h> #include <ctype.h> #include "dict.h" #include "zmalloc.h" +#include "redisassert.h" /* Using dictEnableResize() / dictDisableResize() we make possible to * enable/disable resizing of the hash table as needed. This is very important diff --git a/src/pqsort.c b/src/pqsort.c index 9c57aacd0..1108093a3 100644 --- a/src/pqsort.c +++ b/src/pqsort.c @@ -39,7 +39,6 @@ #include <sys/types.h> -#include <assert.h> #include <errno.h> #include <stdlib.h> 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); diff --git a/src/ziplist.c b/src/ziplist.c index 8a6b54a7c..926a1b627 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -105,12 +105,12 @@ #include <stdlib.h> #include <string.h> #include <stdint.h> -#include <assert.h> #include <limits.h> #include "zmalloc.h" #include "util.h" #include "ziplist.h" #include "endianconv.h" +#include "redisassert.h" #define ZIP_END 255 #define ZIP_BIGLEN 254 diff --git a/src/zipmap.c b/src/zipmap.c index d9b7c8b31..3cd56e5ff 100644 --- a/src/zipmap.c +++ b/src/zipmap.c @@ -78,7 +78,6 @@ #include <stdio.h> #include <string.h> -#include <assert.h> #include "zmalloc.h" #include "endianconv.h" |