From 634aeeb9d58b01f9de6632a014a063ef0c4cf31e Mon Sep 17 00:00:00 2001 From: Chuck Miller Date: Fri, 25 Dec 2009 05:00:31 -0500 Subject: Used the "indent" C formatting program from GNU to do some clean ups The command options used was: -nbad -bap -sc -bl -blf -bli0 -cli4 -cbi0 -di5 -nbc -bls -ip2 -nut -ts4 -bap -i4 -sob -npsl --- src/common/malloc.c | 75 ++++++++++++++++++++++++++++++----------------------- 1 file changed, 42 insertions(+), 33 deletions(-) (limited to 'src/common/malloc.c') diff --git a/src/common/malloc.c b/src/common/malloc.c index eda9bc2..3b302b7 100644 --- a/src/common/malloc.c +++ b/src/common/malloc.c @@ -2,43 +2,52 @@ #include #include "malloc.h" -void* aMalloc_( size_t size, const char *file, int line, const char *func ) +void *aMalloc_ (size_t size, const char *file, int line, const char *func) { - void *ret; - -// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size); - ret=malloc(size); - if(ret==NULL){ - printf("%s:%d: in func %s: malloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; + void *ret; + +// printf("%s:%d: in func %s: malloc %d\n",file,line,func,size); + ret = malloc (size); + if (ret == NULL) + { + printf ("%s:%d: in func %s: malloc error out of memory!\n", file, + line, func); + exit (1); + + } + return ret; } -void* aCalloc_( size_t num, size_t size, const char *file, int line, const char *func ) + +void *aCalloc_ (size_t num, size_t size, const char *file, int line, + const char *func) { - void *ret; - -// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size); - ret=calloc(num,size); - if(ret==NULL){ - printf("%s:%d: in func %s: calloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; + void *ret; + +// printf("%s:%d: in func %s: calloc %d %d\n",file,line,func,num,size); + ret = calloc (num, size); + if (ret == NULL) + { + printf ("%s:%d: in func %s: calloc error out of memory!\n", file, + line, func); + exit (1); + + } + return ret; } -void* aRealloc_( void *p, size_t size, const char *file, int line, const char *func ) +void *aRealloc_ (void *p, size_t size, const char *file, int line, + const char *func) { - void *ret; - -// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size); - ret=realloc(p,size); - if(ret==NULL){ - printf("%s:%d: in func %s: realloc error out of memory!\n",file,line,func); - exit(1); - - } - return ret; + void *ret; + +// printf("%s:%d: in func %s: realloc %p %d\n",file,line,func,p,size); + ret = realloc (p, size); + if (ret == NULL) + { + printf ("%s:%d: in func %s: realloc error out of memory!\n", file, + line, func); + exit (1); + + } + return ret; } -- cgit v1.2.3-70-g09d2