mirror of
https://github.com/vortexgpgpu/vortex.git
synced 2025-06-28 09:37:38 -04:00
fixed getopt exitcode with invalid parameters
This commit is contained in:
parent
2041a4ad4a
commit
a75ed78bf2
26 changed files with 57 additions and 86 deletions
|
@ -33,13 +33,11 @@ const char* program = nullptr;
|
|||
|
||||
static void parse_args(int argc, char **argv) {
|
||||
int c;
|
||||
while ((c = getopt(argc, argv, "rh?")) != -1) {
|
||||
while ((c = getopt(argc, argv, "rh")) != -1) {
|
||||
switch (c) {
|
||||
case 'h':
|
||||
case '?':
|
||||
show_usage();
|
||||
exit(0);
|
||||
break;
|
||||
show_usage();
|
||||
exit(0);
|
||||
default:
|
||||
show_usage();
|
||||
exit(-1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue