]> git.ozlabs.org Git - ccan/blobdiff - ccan/typesafe_cb/_info
cast, str, take, tal/grabfile, tal/str, typesafe_cb: use argc
[ccan] / ccan / typesafe_cb / _info
index a3cdeab584bc346b9a629b796fdf6724521e4901..b4f379dd48b020c29bf8f27c8da88a37831e619a 100644 (file)
@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * typesafe_cb - macros for safe callbacks.
  *     // Silly game to find the longest chain of values.
  *     int main(int argc, char *argv[])
  *     {
- *             int i, run = 1, num = argv[1] ? atoi(argv[1]) : 0;
+ *             int i, run = 1, num = argc > 1 ? atoi(argv[1]) : 0;
  *     
  *             for (i = 1; i < 1024;) {
  *                     // Since run is an int, compiler checks "add" does too.
  *             return 0;
  *     }
  *
- * License: LGPL (v2.1 or any later version)
+ * License: CC0 (Public domain)
  * Author: Rusty Russell <rusty@rustcorp.com.au>
  */
 int main(int argc, char *argv[])