forked from Imagelibrary/binutils-gdb
sim: use libiberty countargv in more places
A bunch of places open code the countargv implementation, or outright duplicate it (as count_argc). Replace all of those w/countargv.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user