aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-options.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-01-03 01:40:46 -0500
committerMike Frysinger <vapier@gentoo.org>2016-01-03 04:08:56 -0500
commit34fed69938f1296b62354b2a825b49602fe7af50 (patch)
treeaeece93f7f3f39429d4b92cb7e4e16a6217d8f64 /sim/common/sim-options.c
parentaba6f46b235a3a139c04d5ed6a3310125aa9c982 (diff)
downloadfsf-binutils-gdb-34fed69938f1296b62354b2a825b49602fe7af50.zip
fsf-binutils-gdb-34fed69938f1296b62354b2a825b49602fe7af50.tar.gz
fsf-binutils-gdb-34fed69938f1296b62354b2a825b49602fe7af50.tar.bz2
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.
Diffstat (limited to 'sim/common/sim-options.c')
-rw-r--r--sim/common/sim-options.c3
1 files changed, 1 insertions, 2 deletions
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;