drd/tests/sem_open: Change the semaphore name (#331839)
[valgrind.git] / memcheck / tests / strchr.c
blob2c77f0903e78dd42554fdbb739f7975c710dc07c
1 #include <stdlib.h>
2 #include <string.h>
4 // The issue here is the same one in memcmptest -- 'strchr' and 'index' are
5 // aliases, as are 'strrchr' and 'rindex'. In each case, the shorter name
6 // gets preferred, ie. 'index' and 'rindex'.
8 int main(int argc, char* argv[])
10 char *s, *a __attribute__((unused)), *b __attribute__((unused));
11 s = malloc(sizeof(char));
13 // Nb: s[0] is uninitialised, but almost certainly a zero
15 a = strchr (s, '1');
16 b = strrchr(s, '1');
17 return 0;//((int)a + (int)b);