Skip to content

Commit

Permalink
beecut: exit if getopt_long_only returns an error
Browse files Browse the repository at this point in the history
beecut now exits if an unknown option was given or an argument was missing
  • Loading branch information
Matthias Ruester committed Feb 23, 2013
1 parent 698d0e7 commit 14c106f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/beecut.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,9 @@ int main(int argc, char *argv[])
case OPT_VERSION:
print_version();
exit(EXIT_SUCCESS);

case '?':
exit(EXIT_FAILURE);
}
} /* end while getopt_long_only */

Expand Down

0 comments on commit 14c106f

Please sign in to comment.