Skip to content

Commit

Permalink
Separate '-h' from "unknown arguments"
Browse files Browse the repository at this point in the history
  • Loading branch information
Benjamin Bertrand committed Sep 9, 2019
1 parent 3e0535c commit b054b6d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions p2pApp/gwmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,9 @@ void getargs(ServerConfig& arg, int argc, char *argv[])
while( (opt=getopt(argc, argv, "qvhiIC"))!=-1)
{
switch(opt) {
case 'h':
usage(argv[0]);
exit(0);
case 'q':
arg.debug--;
break;
Expand All @@ -90,9 +93,8 @@ void getargs(ServerConfig& arg, int argc, char *argv[])
break;
default:
std::cerr<<"Unknown argument -"<<char(opt)<<"\n";
case 'h':
usage(argv[0]);
exit(0);
exit(1);
}
}

Expand Down

0 comments on commit b054b6d

Please sign in to comment.