timer: handle time going backwards.
[ccan] / ccan / tlist / test / compile_fail-tlist_tail.c
index 0a9dabace7bad8462898fa794d496d8fa9d02da6..48f394446e076421c307dddcf2c1a70e91683d79 100644 (file)
@@ -16,21 +16,16 @@ int main(int argc, char *argv[])
 {
        struct tlist_children children;
        struct child child = { "child" };
-       void *c;
+#ifdef FAIL
+       struct cousin *c;
+#else
+       struct child *c;
+#endif
 
        tlist_init(&children);
        tlist_add(&children, &child, list);
 
-       c = tlist_tail(&children,
-#ifdef FAIL
-#if !HAVE_FLEXIBLE_ARRAY_MEMBER
-#error Need flexible array members to check type
-#endif
-                     struct cousin,
-#else
-                     struct child,
-#endif
-                     list);
+       c = tlist_tail(&children, list);
        (void) c; /* Suppress unused-but-set-variable warning. */
        return 0;
 }