aboutsummaryrefslogtreecommitdiffstats
path: root/test/alloc/memdup.c
blob: db4014656b338a7a9af5afab2f8109cad45b36b3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
#include <alloc.h>
#include <mem.h>

static char const src[] = "hello";

int main(void) {
	void *dest = calt_memdup(src, sizeof(src));
	int res = calt_memcmp(src, dest, sizeof(src)) == 0 ? 0 : 1;
	calt_free(dest);
	return res;
}