Introduction
Introduction Statistics Contact Development Disclaimer Help
example.c: improve check for number of arguments - uriparser - URI parser
git clone git://git.codemadness.org/uriparser
Log
Files
Refs
README
LICENSE
---
commit 163a287064136357289d48a806b63ab19a3372e7
parent f003f99bc853675e14235c2750a31571c988543b
Author: Hiltjo Posthuma <[email protected]>
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:
M example.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;
}
You are viewing proxied material from codemadness.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.