diff options
author | Michael Schroeder <mls@suse.de> | 2008-01-09 11:55:50 +0000 |
---|---|---|
committer | Michael Schroeder <mls@suse.de> | 2008-01-09 11:55:50 +0000 |
commit | d9c1b4ab713720b5cd6d30716fed01c80f636b10 (patch) | |
tree | bb59b5e146f76445e20460cf69f07831c87ac100 /src/util.c | |
parent | 824a9d3ea9f94257a0bb7577f395691231d81a0e (diff) | |
download | libsolv-d9c1b4ab713720b5cd6d30716fed01c80f636b10.tar.gz libsolv-d9c1b4ab713720b5cd6d30716fed01c80f636b10.tar.bz2 libsolv-d9c1b4ab713720b5cd6d30716fed01c80f636b10.zip |
- rename xmalloc/... functions to sat_malloc, as we're a
library and mustn't conflict with other libraries
Diffstat (limited to 'src/util.c')
-rw-r--r-- | src/util.c | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -13,7 +13,7 @@ #include "util.h" void * -xmalloc(size_t len) +sat_malloc(size_t len) { void *r = malloc(len ? len : 1); if (r) @@ -23,18 +23,18 @@ xmalloc(size_t len) } void * -xmalloc2(size_t num, size_t len) +sat_malloc2(size_t num, size_t len) { if (len && (num * len) / len != num) { fprintf(stderr, "Out of memory allocating %zu*%zu bytes!\n", num, len); exit(1); } - return xmalloc(num * len); + return sat_malloc(num * len); } void * -xrealloc(void *old, size_t len) +sat_realloc(void *old, size_t len) { if (old == 0) old = malloc(len ? len : 1); @@ -47,18 +47,18 @@ xrealloc(void *old, size_t len) } void * -xrealloc2(void *old, size_t num, size_t len) +sat_realloc2(void *old, size_t num, size_t len) { if (len && (num * len) / len != num) { fprintf(stderr, "Out of memory allocating %zu*%zu bytes!\n", num, len); exit(1); } - return xrealloc(old, num * len); + return sat_realloc(old, num * len); } void * -xcalloc(size_t num, size_t len) +sat_calloc(size_t num, size_t len) { void *r; if (num == 0 || len == 0) @@ -72,7 +72,7 @@ xcalloc(size_t num, size_t len) } void * -xfree(void *mem) +sat_free(void *mem) { if (mem) free(mem); |