From 6b60a80ec1b740fc030ef5decff6bd5904993972 Mon Sep 17 00:00:00 2001 From: antirez Date: Mon, 19 Aug 2013 14:54:31 +0200 Subject: assert.h replaced with redisassert.h when appropriate. Also a warning was suppressed by including unistd.h in redisassert.h (needed for _exit()). --- src/dict.c | 2 +- src/pqsort.c | 1 - src/redisassert.h | 4 +++- src/ziplist.c | 2 +- src/zipmap.c | 1 - 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/dict.c b/src/dict.c index ad95d7498..dd4156d2f 100644 --- a/src/dict.c +++ b/src/dict.c @@ -39,13 +39,13 @@ #include #include #include -#include #include #include #include #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 57c217f94..7325a88a4 100644 --- a/src/pqsort.c +++ b/src/pqsort.c @@ -39,7 +39,6 @@ #include -#include #include #include 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 /* 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 fdfc2e9ce..d78f8f5da 100644 --- a/src/ziplist.c +++ b/src/ziplist.c @@ -105,12 +105,12 @@ #include #include #include -#include #include #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 #include -#include #include "zmalloc.h" #include "endianconv.h" -- cgit v1.2.1