blob: 080eb2f6316edab0876101096bcaeaef807dcc0d (
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 = malloc(size)))
return NULL;
memcpy(r, p, size);
return r;
}
|