]> granicus.if.org Git - curl/commitdiff
Print usage in case 'arg2 == NULL'.
authorGisle Vanem <gvanem@broadpark.no>
Sat, 9 Sep 2006 16:55:21 +0000 (16:55 +0000)
committerGisle Vanem <gvanem@broadpark.no>
Sat, 9 Sep 2006 16:55:21 +0000 (16:55 +0000)
tests/libtest/lib525.c

index 3726bf6dd8a16055b08d396ddf7415a524540676..9946ce3542aa789168ccda469684b0a08bcacf4c 100644 (file)
@@ -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);