diff options
Diffstat (limited to 'sim/common')
-rw-r--r-- | sim/common/ChangeLog | 5 | ||||
-rw-r--r-- | sim/common/sim-options.c | 3 |
2 files changed, 6 insertions, 2 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog index 2e444d1..e66c289 100644 --- a/sim/common/ChangeLog +++ b/sim/common/ChangeLog @@ -1,5 +1,10 @@ 2016-01-03 Mike Frysinger <vapier@gentoo.org> + * sim-options.c (sim_parse_args): Replace for loop with a call + to countargv. + +2016-01-03 Mike Frysinger <vapier@gentoo.org> + * nrun.c (myname): Mark const. (main): Mark name const. Replace myname parsing loop with a call to lbasename. diff --git a/sim/common/sim-options.c b/sim/common/sim-options.c index e252756..88663f7 100644 --- a/sim/common/sim-options.c +++ b/sim/common/sim-options.c @@ -474,8 +474,7 @@ sim_parse_args (SIM_DESC sd, char **argv) SIM_RC result = SIM_RC_OK; /* Count the number of arguments. */ - for (argc = 0; argv[argc] != NULL; ++argc) - continue; + argc = countargv (argv); /* Count the number of options. */ num_opts = 0; |