uriparser

URI parser
git clone git://git.codemadness.org/uriparser
Log | Files | Refs | README | LICENSE

commit 163a287064136357289d48a806b63ab19a3372e7
parent f003f99bc853675e14235c2750a31571c988543b
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Thu, 23 Nov 2023 20:29:30 +0100

example.c: improve check for number of arguments

Be more strict, silently accepting something might give wrong expectations.

Diffstat:
Mexample.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/example.c b/example.c @@ -21,7 +21,7 @@ main(int argc, char *argv[]) char buf[4096]; int r; - if (argc < 2) { + if (argc < 2 || argc > 3) { fprintf(stderr, "usage: %s <url> [baseurl]\n", argv[0]); return 1; }