From: Gisle Vanem Date: Sat, 9 Sep 2006 16:55:21 +0000 (+0000) Subject: Print usage in case 'arg2 == NULL'. X-Git-Tag: curl-7_16_0~195 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=145084b69973fe355a0114f63aef6336f7a94e77;p=curl Print usage in case 'arg2 == NULL'. --- diff --git a/tests/libtest/lib525.c b/tests/libtest/lib525.c index 3726bf6dd..9946ce354 100644 --- a/tests/libtest/lib525.c +++ b/tests/libtest/lib525.c @@ -25,6 +25,11 @@ int test(char *URL) char done=FALSE; CURLM *m; + if (!arg2) { + fprintf(stderr, "Usage: lib525 [url] [uploadfile]\n"); + return -1; + } + /* get the file size of the local file */ hd = open(arg2, O_RDONLY) ; fstat(hd, &file_info);