s3:smbd: also log the "offline" flag when debugging the dos-mode
[Samba/gebeck_regimport.git] / lib / ccan / tlist / test / compile_fail-tlist_for_each_safe.c
blob41a3d923b1eb2b173fec6f74a630dc357e5823fb
1 #include <ccan/tlist/tlist.h>
3 TLIST_TYPE(children, struct child);
5 struct child {
6 const char *name;
7 struct ccan_list_node list;
8 };
10 struct cousin {
11 const char *name;
12 struct ccan_list_node list;
15 int main(int argc, char *argv[])
17 struct tlist_children children;
18 struct child child = { "child" };
19 #ifdef FAIL
20 #if !HAVE_FLEXIBLE_ARRAY_MEMBER
21 #error Need flexible array members to check type
22 #endif
23 struct cousin *c, *n;
24 #else
25 struct child *c, *n;
26 #endif
28 tlist_init(&children);
29 tlist_add(&children, &child, list);
31 tlist_for_each_safe(&children, c, n, list);
32 return 0;