diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-04-25 10:27:13 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-04-25 10:27:13 +0000 |
commit | 2eb6dec8e9f0114bdbad59cf8f11f197f8fdaaf3 (patch) | |
tree | 88a2b13b2fc9abdd9fa43136d4ed91bdc084d929 /malloc.c | |
parent | 130f9f7046eec89f7674cad7f66c831fa8d0127d (diff) |
initial commit
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@3 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'malloc.c')
-rw-r--r-- | malloc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/malloc.c b/malloc.c new file mode 100644 index 0000000..080eb2f --- /dev/null +++ b/malloc.c @@ -0,0 +1,13 @@ +#include <string.h> + +#include "malloc.h" + +void* sa_memdup(const void* p, size_t size) { + void *r; + + if (!(r = malloc(size))) + return NULL; + + memcpy(r, p, size); + return r; +} |