Sign in
llvm
/
llvm-archive
/
089ca8750d7cd1f1ec96968922bf4bcfe223bb3a
/
.
/
safecode
/
test
/
cstdlib
/
memcpy-003.c
blob: 53127637c7aa1ccc490c542a68a71a032b48325d [
file
] [
log
] [
blame
]
// RUN: test.sh -p -t %t %s
#include
<string.h>
#include
<assert.h>
// Example of the correct usage of memcpy().
int
main
()
{
char
src
[]
=
"aaaaaaaaaab"
;
char
dst
[
100
];
memcpy
(
dst
,
src
,
11
);
assert
(
memcmp
(
dst
,
src
,
11
)
==
0
);
return
0
;
}