Commit 145084b6 authored by Gisle Vanem's avatar Gisle Vanem
Browse files

Print usage in case 'arg2 == NULL'.

parent f1ba1260
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -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);