Skip to content

Commit 84f932c

Browse files
authored
Merge eb63a20 into f1268ad
2 parents f1268ad + eb63a20 commit 84f932c

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

pvtoolsSrc/pvget.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -276,6 +276,12 @@ int MAIN (int argc, char *argv[])
276276

277277
// ================ Parse Arguments
278278

279+
if(argc == 1){
280+
/* No arguments specified */
281+
fprintf(stderr, "No arguments specified. Please use " EXECNAME" -h for help");
282+
return 1;
283+
}
284+
279285
while ((opt = getopt(argc, argv, ":hvVRM:r:w:tmp:qdcF:f:ni")) != -1) {
280286
switch (opt) {
281287
case 'h': /* Print usage */
@@ -360,9 +366,6 @@ int MAIN (int argc, char *argv[])
360366
"Option '-%c' requires an argument. ('" EXECNAME " -h' for help.)\n",
361367
optopt);
362368
return 1;
363-
default :
364-
usage();
365-
return 1;
366369
}
367370
}
368371

0 commit comments

Comments
 (0)