timer: handle time going backwards.
[ccan] / ccan / asearch / test / compile_fail-return-value.c
1 #include <ccan/asearch/asearch.h>
2
3 #include <ccan/asearch/asearch.c>
4
5 static int cmp(const char *key, char *const *elem, void *ctx)
6 {
7         return 0;
8 }
9
10 int main(int argc, char **argv)
11 {
12         const char key[] = "key";
13
14 #ifdef FAIL
15         int **p;
16 #if !HAVE_TYPEOF
17 #error "Unfortunately we don't fail if no typeof."
18 #endif
19 #else
20         char **p;
21 #endif
22         p = asearch(key, argv+1, argc-1, cmp, NULL);
23         return p ? 0 : 1;
24 }