Whitespace and more syncing.

This commit is contained in:
Nicholas Marriott
2009-06-25 16:34:50 +00:00
parent 8df98d1f5b
commit bb459beb03
13 changed files with 27 additions and 57 deletions

View File

@ -1,4 +1,4 @@
/* $Id: xmalloc.c,v 1.8 2009-01-29 19:24:34 nicm Exp $ */
/* $Id: xmalloc.c,v 1.9 2009-06-25 16:34:50 nicm Exp $ */
/*
* Copyright (c) 2004 Nicholas Marriott <nicm@users.sourceforge.net>
@ -50,9 +50,6 @@ xcalloc(size_t nmemb, size_t size)
if ((ptr = calloc(nmemb, size)) == NULL)
fatal("xcalloc failed");
#ifdef DEBUG
xmalloc_new(xmalloc_caller(), ptr, nmemb * size);
#endif
return (ptr);
}
@ -66,9 +63,6 @@ xmalloc(size_t size)
if ((ptr = malloc(size)) == NULL)
fatal("xmalloc failed");
#ifdef DEBUG
xmalloc_new(xmalloc_caller(), ptr, size);
#endif
return (ptr);
}
@ -85,9 +79,6 @@ xrealloc(void *oldptr, size_t nmemb, size_t size)
if ((newptr = realloc(oldptr, newsize)) == NULL)
fatal("xrealloc failed");
#ifdef DEBUG
xmalloc_change(xmalloc_caller(), oldptr, newptr, nmemb * size);
#endif
return (newptr);
}
@ -97,10 +88,6 @@ xfree(void *ptr)
if (ptr == NULL)
fatalx("null pointer");
free(ptr);
#ifdef DEBUG
xmalloc_free(ptr);
#endif
}
int printflike2
@ -125,9 +112,6 @@ xvasprintf(char **ret, const char *fmt, va_list ap)
if (i < 0 || *ret == NULL)
fatal("xvasprintf failed");
#ifdef DEBUG
xmalloc_new(xmalloc_caller(), *ret, i + 1);
#endif
return (i);
}