blob: 6a895540dfd4c885a0c2aac6752224eac1b82424 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
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;
}
|