Skip to content
This repository has been archived by the owner on Aug 27, 2023. It is now read-only.

Commit

Permalink
Simulator: fix argument parsing.
Browse files Browse the repository at this point in the history
When getopt_long sets *flag to val, it returns 0.  Previously this
was considered an error. See getopt(3).
  • Loading branch information
Justus Winter authored and Traumflug committed May 18, 2018
1 parent 6f46e95 commit 7760ef3
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions simulator/simulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ void sim_start(int argc, char** argv) {

while ((c = getopt_long (argc, argv, shortopts, opts, &index)) != -1)
switch (c) {
case 0:
// Long option without short counterpart.
break;
case 'q':
verbose = 0;
break;
Expand Down

0 comments on commit 7760ef3

Please sign in to comment.