From 1d012b4c8bd6571bb9149ee23f338ccbc08ac2f4 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Mon, 15 Apr 1996 10:23:42 +0000 Subject: [PATCH] fix making XMALLOC_DEBUG on by default --- lib/util.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lib/util.c b/lib/util.c index 1b9b35823d..08d036d7f9 100644 --- a/lib/util.c +++ b/lib/util.c @@ -1,4 +1,4 @@ -/* $Id: util.c,v 1.5 1996/04/15 03:57:04 wessels Exp $ */ +/* $Id: util.c,v 1.6 1996/04/15 04:23:42 wessels Exp $ */ #include #include @@ -17,9 +17,8 @@ extern char *sys_errlist[]; #include "autoconf.h" -#define XMALLOC_DEBUG -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG #define DBG_ARRY_SZ (2<<8) #define DBG_ARRY_BKTS (2<<8) static void *malloc_ptrs[DBG_ARRY_BKTS][DBG_ARRY_SZ]; @@ -108,7 +107,7 @@ void *xmalloc(sz) } exit(1); } -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG check_malloc(p, sz); #endif return (p); @@ -120,7 +119,7 @@ void *xmalloc(sz) void xfree(s) void *s; { -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG check_free(s); #endif if (s != NULL) @@ -131,7 +130,7 @@ void xfree(s) void xxfree(s) void *s; { -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG check_free(s); #endif free(s); @@ -159,7 +158,7 @@ void *xrealloc(s, sz) } exit(1); } -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG check_malloc(p, sz); #endif return (p); @@ -189,7 +188,7 @@ void *xcalloc(n, sz) } exit(1); } -#ifdef XMALLOC_DEBUG +#if XMALLOC_DEBUG check_malloc(p, sz * n); #endif return (p); -- 2.47.3