X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcontainer_of%2F_info.c;fp=ccan%2Fcontainer_of%2F_info.c;h=4c25c296036d510a84f2df79c44736004e2200f7;hp=194fcabaf4c07c20e5004633f1fb9d1ec311e57b;hb=49b125f3c4cab0240523c976e1d48493ae8644e6;hpb=7beaa3448fa8e6015798c1609f33d96e8986063d diff --git a/ccan/container_of/_info.c b/ccan/container_of/_info.c index 194fcaba..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,9 @@ * struct info info = { .my_stuff = 1 }; * * register_timer(&info.timer); - * ... + * // ... + * return 0; + * } * * Licence: LGPL (2 or any later version) */