summaryrefslogtreecommitdiffstats
path: root/lib/memory.h
diff options
context:
space:
mode:
authorChris Hall <GMCH@hestia.halldom.com>2010-04-17 16:50:23 +0100
committerChris Hall <GMCH@hestia.halldom.com>2010-04-17 16:50:23 +0100
commit31d9b6c31d949bf0e884d8a6e02939345b9816e1 (patch)
tree7a6588c12a16f99b512232b77e86118837c646c4 /lib/memory.h
parent825f338d44433fc2d351c08d41272f52a15329db (diff)
downloadquagga-31d9b6c31d949bf0e884d8a6e02939345b9816e1.tar.bz2
quagga-31d9b6c31d949bf0e884d8a6e02939345b9816e1.tar.xz
Bring up to date with 0.99.16 release
This brings this branch up to date with 0.99.16, EXCEPT for the change to bgpd to use monotonic clock for timing updates. There are places where bgpd expects to find the actual time that things happened... so this change is not though to be complete. Further tidying in zebra, for FreeBSD.
Diffstat (limited to 'lib/memory.h')
-rw-r--r--lib/memory.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/memory.h b/lib/memory.h
index 5fa5c5ac..d67e865b 100644
--- a/lib/memory.h
+++ b/lib/memory.h
@@ -48,7 +48,10 @@ extern struct mlist mlists[];
#define XREALLOC(mtype, ptr, size) \
mtype_zrealloc (__FILE__, __LINE__, (mtype), (ptr), (size))
#define XFREE(mtype, ptr) \
- mtype_zfree (__FILE__, __LINE__, (mtype), (ptr))
+ do { \
+ mtype_zfree (__FILE__, __LINE__, (mtype), (ptr)); \
+ ptr = NULL; } \
+ while (0)
#define XSTRDUP(mtype, str) \
mtype_zstrdup (__FILE__, __LINE__, (mtype), (str))
#else
@@ -92,7 +95,7 @@ extern void *mtype_zmalloc (const char *file, int line, enum MTYPE type,
size_t size);
extern void *mtype_zcalloc (const char *file, int line, enum MTYPE type,
- size_t num, size_t size);
+ size_t size);
extern void *mtype_zrealloc (const char *file, int line, enum MTYPE type,
void *ptr, size_t size);