From 145084b69973fe355a0114f63aef6336f7a94e77 Mon Sep 17 00:00:00 2001 From: Gisle Vanem Date: Sat, 9 Sep 2006 16:55:21 +0000 Subject: Print usage in case 'arg2 == NULL'. --- tests/libtest/lib525.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests') 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); -- cgit v1.2.3