Print usage in case 'arg2 == NULL'.

This commit is contained in:
Gisle Vanem 2006-09-09 16:55:21 +00:00
parent f1ba12607a
commit 145084b699

View 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);