]> git.ozlabs.org Git - ccan/blobdiff - ccan/container_of/_info
ccan: Correct some poor conventions in _info includes
[ccan] / ccan / container_of / _info
index 2b9da338a70a9abd0bf97594929c2a08a9dee66c..d50094bc68ec1ef077182028c0d045923160562f 100644 (file)
@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * container_of - routine for upcasting
  *             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);
  *     }
  *
- *     int main()
+ *     int main(void)
  *     {
  *             struct info info = { .my_stuff = 1 };
  *
@@ -41,7 +46,7 @@
  *             return 0;
  *     }
  *
- * Licence: LGPL (2 or any later version)
+ * License: CC0 (Public domain)
  * Author: Rusty Russell <rusty@rustcorp.com.au>
  */
 int main(int argc, char *argv[])