X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Ftal%2Fstr%2F_info;h=3037cfde2fba99fcf1e817c0117ed8b89909fee3;hp=6fd94dc5654093d3dc909f7175791784f70b9fd4;hb=ed6dd33e06c0e8f1c4dd006e0b70d9f2d6ba6c09;hpb=291237b4fed863be74051274ac5ad9920cb33cc3 diff --git a/ccan/tal/str/_info b/ccan/tal/str/_info index 6fd94dc5..3037cfde 100644 --- a/ccan/tal/str/_info +++ b/ccan/tal/str/_info @@ -11,7 +11,7 @@ * * Example: * #include - * #include + * #include * #include * * // Dumb demo program to double-linespace a file. @@ -20,8 +20,10 @@ * char *textfile; * char **lines; * + * if (argc > 2) + * errx(1, "Takes 0 or 1 arguments"); * // Grab lines in file. - * textfile = grab_file(NULL, argv[1], NULL); + * textfile = grab_file(NULL, argv[1]); * if (!textfile) * err(1, "Failed reading %s", argv[1]); * lines = tal_strsplit(textfile, textfile, "\n", STR_EMPTY_OK);