X-Git-Url: https://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fstr%2F_info;h=b579525faac18e1fa52096b2e9b6eff34a70b404;hp=2d52291a6c1be2dafe369bfbc79227082b5301b3;hb=HEAD;hpb=8fc7a90a8db345c4276419d11f8731afc63f65f5 diff --git a/ccan/str/_info b/ccan/str/_info index 2d52291a..b579525f 100644 --- a/ccan/str/_info +++ b/ccan/str/_info @@ -1,6 +1,6 @@ +#include "config.h" #include #include -#include "config.h" /** * str - string helper routines @@ -26,16 +26,16 @@ * * 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 (v2.1 or any later version) + * License: CC0 (Public domain) * Author: Rusty Russell */ int main(int argc, char *argv[])