Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

assert.h replaced with redisassert.h when appropriate.

Also a warning was suppressed by including unistd.h in redisassert.h
(needed for _exit()).
  • Loading branch information...
commit 837817b2b711c2d75143853be164d477481a9730 1 parent bd353d9
@antirez authored
View
2  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
View
1  src/pqsort.c
@@ -39,7 +39,6 @@
#include <sys/types.h>
-#include <assert.h>
#include <errno.h>
#include <stdlib.h>
View
4 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);
View
2  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
View
1  src/zipmap.c
@@ -78,7 +78,6 @@
#include <stdio.h>
#include <string.h>
-#include <assert.h>
#include "zmalloc.h"
#include "endianconv.h"
Please sign in to comment.
Something went wrong with that request. Please try again.