Gitiles
Code Review
Sign In
gerrit-public.fairphone.software
/
platform
/
external
/
valgrind
/
d7f076640a854e3019cbeaa52642296e08b2cd83
/
.
/
tests
/
memcmptest.c
blob: 56dd85fbd3a18f627fc8e2f30f11636c1c0f71d7 [
file
] [
log
] [
blame
]
#include
<string.h>
#include
<stdio.h>
char
*
s1
;
char
*
s2
;
int
main
(
void
)
{
s1
=
malloc
(
10
);
strcpy
(
s1
,
"fooble"
);
s2
=
malloc
(
10
);
strcpy
(
s2
,
"fooble"
);
if
(
memcmp
(
s1
,
s2
,
8
)
!=
0
)
printf
(
"different\n"
);
else
printf
(
"same (?!)\n"
);
return
0
;
}