diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tinyproxy.h | 8 | ||||
-rw-r--r-- | src/utils.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/src/tinyproxy.h b/src/tinyproxy.h index 5ca4f18..28a1ff0 100644 --- a/src/tinyproxy.h +++ b/src/tinyproxy.h @@ -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. * @@ -69,6 +69,12 @@ #define min(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 */ typedef enum { FALSE = 0, diff --git a/src/utils.h b/src/utils.h index 25c983c..2e80567 100644 --- a/src/utils.h +++ b/src/utils.h @@ -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. * @@ -21,8 +21,6 @@ #include "tinyproxy.h" -#define safefree(x) free(x); x = NULL - extern char *xstrstr(char *haystack, char *needle, size_t length, bool_t case_sensitive); |