diff options
author | Lennart Poettering <lennart@poettering.net> | 2007-10-01 20:16:28 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2007-10-01 20:16:28 +0000 |
commit | 7d83e5c7816b5e343695a75ba58b32dbe1be969a (patch) | |
tree | bfd1dfc9b7c8f4a2aaf66c1b30e78355dee8c88a /src/malloc.c | |
parent | 762196328ab7e60f1d2908fd5a337d2ca99726dd (diff) |
move all sources down to a seperate src/ tree
git-svn-id: file:///home/lennart/svn/public/libsydney/trunk@34 9ba3c220-e4d3-45a2-8aa3-73fcc9aff6ce
Diffstat (limited to 'src/malloc.c')
-rw-r--r-- | src/malloc.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/malloc.c b/src/malloc.c new file mode 100644 index 0000000..6a89554 --- /dev/null +++ b/src/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 = sa_malloc(size))) + return NULL; + + memcpy(r, p, size); + return r; +} |