assert.h replaced with redisassert.h when appropriate.

Also a warning was suppressed by including unistd.h in redisassert.h
(needed for _exit()).
This commit is contained in:
antirez 2013-08-19 14:54:31 +02:00
parent ca294c6b1e
commit 1c75408457
5 changed files with 5 additions and 5 deletions

View File

@ -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 File

@ -39,7 +39,6 @@
#include <sys/types.h>
#include <assert.h>
#include <errno.h>
#include <stdlib.h>

View File

@ -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 File

@ -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 File

@ -78,7 +78,6 @@
#include <stdio.h>
#include <string.h>
#include <assert.h>
#include "zmalloc.h"
#include "endianconv.h"