aboutsummaryrefslogblamecommitdiffstats
path: root/memdup.c
blob: f3997a6c4fb560987b981cf8cbb974e2e03971ec (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12











                                                         
/* See LICENSE file for copyright and license details. */
#include "libsimple.h"


void *
libsimple_memdup(const void *s, size_t n)
{
	void *ret = malloc(n);
	if (!ret)
		return NULL;
	return memcpy(ret, s, n);
}