X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcontainer_of%2F_info.c;h=4c25c296036d510a84f2df79c44736004e2200f7;hp=96c12d88cdeb0d27f6ee30ab25c572810623c73d;hb=04160dbda10c78fbd4ee452d0af89d540e20b09a;hpb=650c775ff00cccd03fc84e7789a03c51d9839004 diff --git a/ccan/container_of/_info.c b/ccan/container_of/_info.c index 96c12d88..4c25c296 100644 --- a/ccan/container_of/_info.c +++ b/ccan/container_of/_info.c @@ -14,8 +14,14 @@ * callback. * * Example: - * struct info - * { + * #include + * #include + * + * struct timer { + * void *members; + * }; + * + * struct info { * int my_stuff; * struct timer timer; * }; @@ -31,7 +37,11 @@ * struct info info = { .my_stuff = 1 }; * * register_timer(&info.timer); - * ... + * // ... + * return 0; + * } + * + * Licence: LGPL (2 or any later version) */ int main(int argc, char *argv[]) {