X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=ccan%2Fcontainer_of%2F_info;h=b1160522edd4fcfd52935d39227d3d19653149ec;hb=f6557ca6537bc4d37fb4be215184a632533ba4e7;hp=cc912320c1ac04fc5b67b19881027db685240085;hpb=7f63d84eb712c54c57c3d4e9a92ffefe2f1b2ade;p=ccan diff --git a/ccan/container_of/_info b/ccan/container_of/_info index cc912320..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; * } * - * License: LGPL (2 or any later version) + * License: CC0 (Public domain) * Author: Rusty Russell */ int main(int argc, char *argv[])