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

static char const src[] = "hello";
static char dest[sizeof(src)] = {0};

int main(void) {
	calt_memmove_null(dest, src, 3);
	return calt_memcmp(src, dest, 3) == 0
		   ? calt_memcmp("\0\0\0", dest + 3, 3) == 0 ? 0 : 1
		   : 1;
}