]> git.ozlabs.org Git - ccan/blobdiff - ccan/str/_info
cast, str, take, tal/grabfile, tal/str, typesafe_cb: use argc
[ccan] / ccan / str / _info
index ea314dbf799a3460db02771aa356991870ec13ce..b579525faac18e1fa52096b2e9b6eff34a70b404 100644 (file)
@@ -1,6 +1,6 @@
+#include "config.h"
 #include <stdio.h>
 #include <string.h>
-#include "config.h"
 
 /**
  * str - string helper routines
  *
  *     int main(int argc, char *argv[])
  *     {
- *             if (argv[1] && streq(argv[1], "--verbose"))
+ *             if (argc > 1 && streq(argv[1], "--verbose"))
  *                     printf("verbose set\n");
- *             if (argv[1] && strstarts(argv[1], "--"))
+ *             if (argc > 1 && strstarts(argv[1], "--"))
  *                     printf("Some option set\n");
- *             if (argv[1] && strends(argv[1], "cow-powers"))
+ *             if (argc > 1 && strends(argv[1], "cow-powers"))
  *                     printf("Magic option set\n");
  *             return 0;
  *     }
  *
- * License: LGPL (2 or any later version)
+ * License: CC0 (Public domain)
  * Author: Rusty Russell <rusty@rustcorp.com.au>
  */
 int main(int argc, char *argv[])