Moved the safefree() macro to the tinyproxy.h header.
This commit is contained in:
parent
fd61e791b5
commit
a2c3e5ecc9
@ -1,4 +1,4 @@
|
|||||||
/* $Id: tinyproxy.h,v 1.5 2000-09-14 16:41:20 rjkaes Exp $
|
/* $Id: tinyproxy.h,v 1.6 2000-09-26 04:58:35 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* See 'tinyproxy.c' for a detailed description.
|
* See 'tinyproxy.c' for a detailed description.
|
||||||
*
|
*
|
||||||
@ -69,6 +69,12 @@
|
|||||||
#define min(a,b) ((a) < (b) ? (a) : (b))
|
#define min(a,b) ((a) < (b) ? (a) : (b))
|
||||||
#define max(a,b) ((a) > (b) ? (a) : (b))
|
#define max(a,b) ((a) > (b) ? (a) : (b))
|
||||||
|
|
||||||
|
#ifndef NDEBUG
|
||||||
|
# define safefree(x) do { free(x); x = NULL; } while (0)
|
||||||
|
#else
|
||||||
|
# define safefree(x) free(x)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Make a new type: bool_t */
|
/* Make a new type: bool_t */
|
||||||
typedef enum {
|
typedef enum {
|
||||||
FALSE = 0,
|
FALSE = 0,
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
/* $Id: utils.h,v 1.2 2000-09-12 00:01:29 rjkaes Exp $
|
/* $Id: utils.h,v 1.3 2000-09-26 04:58:35 rjkaes Exp $
|
||||||
*
|
*
|
||||||
* See 'utils.h' for a detailed description.
|
* See 'utils.h' for a detailed description.
|
||||||
*
|
*
|
||||||
@ -21,8 +21,6 @@
|
|||||||
|
|
||||||
#include "tinyproxy.h"
|
#include "tinyproxy.h"
|
||||||
|
|
||||||
#define safefree(x) free(x); x = NULL
|
|
||||||
|
|
||||||
extern char *xstrstr(char *haystack, char *needle, size_t length,
|
extern char *xstrstr(char *haystack, char *needle, size_t length,
|
||||||
bool_t case_sensitive);
|
bool_t case_sensitive);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user