X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fcontainer_of%2F_info;h=b1160522edd4fcfd52935d39227d3d19653149ec;hp=8580526a40040913736b449d458fe1dd35580efb;hb=c3a934d277c3a8ef528152b10e658a8f22b4df49;hpb=18636637ee013ef828cb04b2b7bb4a4922324475 diff --git a/ccan/container_of/_info b/ccan/container_of/_info index 8580526a..b1160522 100644 --- a/ccan/container_of/_info +++ b/ccan/container_of/_info @@ -1,6 +1,6 @@ +#include "config.h" #include #include -#include "config.h" /** * container_of - routine for upcasting @@ -26,17 +26,19 @@ * struct timer timer; * }; * - * static void register_timer(struct timer *timer) - * { - * //... - * } - * * static void my_timer_callback(struct timer *timer) * { * struct info *info = container_of(timer, struct info, timer); * printf("my_stuff is %u\n", info->my_stuff); * } * + * static void register_timer(struct timer *timer) + * { + * (void)timer; + * (void)my_timer_callback; + * //... + * } + * * int main(void) * { * struct info info = { .my_stuff = 1 }; @@ -46,7 +48,7 @@ * return 0; * } * - * Licence: LGPL (2 or any later version) + * License: CC0 (Public domain) * Author: Rusty Russell */ int main(int argc, char *argv[])