aboutsummaryrefslogtreecommitdiffstats
path: root/test/mem/memmove_overlap.c
blob: 6e786b5bdcc2120f09e354a0185e0a4811c24be6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <mem.h>
#include <stdio.h>
#include <string.h>

static char buf[] = "hello world";

int main(void) {
	calt_memmove(buf + 1, buf + 2, 5);
	return calt_memcmp(buf, "hllo wworld",
			   sizeof buf - 1) == 0
		   ? 0
		   : 1;
}