diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-09-26 22:09:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-09-26 22:09:35 +0100 |
commit | 0c543c5de3592439f7b30a3a0013aa423ce489c8 (patch) | |
tree | 914f214083768a52cf2f02a88377b9641e456590 /src/common.c | |
parent | 7951918b9417ef9597bcf117b19450e2d3011301 (diff) |
ditch wg_malloc/realloc
Diffstat (limited to 'src/common.c')
-rw-r--r-- | src/common.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/src/common.c b/src/common.c index edfe065..32396f5 100644 --- a/src/common.c +++ b/src/common.c @@ -57,23 +57,6 @@ extern void wgmem_error(const char *fmt, ...) va_end(ap); } -extern void *wg_malloc(size_t size) -{ - void *result; - if (!size) - { - wgmem_error("Error mallocing 0 bytes.\n"); - } - - result = malloc(size); - if (!result) - { - wgmem_error("Error while mallocing %u bytes.\n", size); - } - - return result; -} - extern void *wg_calloc(size_t nmemb, size_t size) { void *result; @@ -122,25 +105,6 @@ extern char *wg_strdup(const char *s) return (result); } -extern void *wg_realloc(void *ptr, size_t size) -{ - void *result; - - if (!size) - { - wgmem_error("Error reallocing 0 bytes.\n"); - } - - result = realloc(ptr, size); - - if (!result) - { - wgmem_error("Error while reallocing %u bytes.\n", size); - } - - return (result); -} - extern char *wg_getline(char *line, int size, FILE * fp) { char *p; |