diff options
author | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-07-06 13:29:57 +0000 |
---|---|---|
committer | lanfer <lanfer@17b73243-c579-4c4c-a9d2-2d5706c11dac> | 2000-07-06 13:29:57 +0000 |
commit | b6946f3f924388e74095f8f92cb7b4c98c152d15 (patch) | |
tree | 75ced4d93c33516bd8af1f9f58681c0a78f89052 /src/include/cctki_Malloc.h | |
parent | a9dc555f377c6a3f5073be4c1af99abebf6e455a (diff) |
protecting arguments with ()
git-svn-id: http://svn.cactuscode.org/flesh/trunk@1711 17b73243-c579-4c4c-a9d2-2d5706c11dac
Diffstat (limited to 'src/include/cctki_Malloc.h')
-rw-r--r-- | src/include/cctki_Malloc.h | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/src/include/cctki_Malloc.h b/src/include/cctki_Malloc.h index 9d43cd7e..5f898a4a 100644 --- a/src/include/cctki_Malloc.h +++ b/src/include/cctki_Malloc.h @@ -1,20 +1,28 @@ -#define CCTK_DEBUG_DEBUG +/*#define CCTK_DEBUG_DEBUG*/ #if defined(CCTK_DEBUG_DEBUG) #include <stdlib.h> +#ifdef malloc #undef malloc -#define malloc(x) CCTKi_Malloc(x,__LINE__,__FILE__) +#endif +#define malloc(x) CCTKi_Malloc((x),__LINE__,__FILE__) +#ifdef free #undef free -#define free(x) CCTKi_Free(x,__LINE__,__FILE__) +#endif +#define free(x) CCTKi_Free((x),__LINE__,__FILE__) +#ifdef calloc #undef calloc -#define calloc(x,y) CCTKi_Calloc(x, y,__LINE__,__FILE__) +#endif +#define calloc(x,y) CCTKi_Calloc((x), (y),__LINE__,__FILE__) +#ifdef realloc #undef realloc -#define realloc(x,y) CCTKi_Realloc(x, y,__LINE__,__FILE__) +#endif +#define realloc(x,y) CCTKi_Realloc((x), (y),__LINE__,__FILE__) void *CCTKi_Malloc(size_t size, int line, const char *file); void CCTKi_Free(void *pointer, int line, const char *file); |