summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert James Kaes <rjkaes@users.sourceforge.net>2000-09-26 04:58:35 +0000
committerRobert James Kaes <rjkaes@users.sourceforge.net>2000-09-26 04:58:35 +0000
commita2c3e5ecc9d0ade4fbff56e22fa87d6050601475 (patch)
treee04f36f7d333c0bbd3fb5745f8485fd5b667070a
parentfd61e791b5c199efe843ad7e913718643042a219 (diff)
downloadtinyproxy-a2c3e5ecc9d0ade4fbff56e22fa87d6050601475.tar.gz
tinyproxy-a2c3e5ecc9d0ade4fbff56e22fa87d6050601475.zip
Moved the safefree() macro to the tinyproxy.h header.
Diffstat (limited to '')
-rw-r--r--src/tinyproxy.h8
-rw-r--r--src/utils.h4
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);