aboutsummaryrefslogtreecommitdiff
path: root/sim/arm
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/arm
parentaba6f46b235a3a139c04d5ed6a3310125aa9c982 (diff)
downloadgdb-34fed69938f1296b62354b2a825b49602fe7af50.zip
gdb-34fed69938f1296b62354b2a825b49602fe7af50.tar.gz
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/arm')
-rw-r--r--sim/arm/ChangeLog5
-rw-r--r--sim/arm/wrapper.c7
2 files changed, 6 insertions, 6 deletions
diff --git a/sim/arm/ChangeLog b/sim/arm/ChangeLog
index a0b00f2..e9346c1 100644
--- a/sim/arm/ChangeLog
+++ b/sim/arm/ChangeLog
@@ -1,5 +1,10 @@
2016-01-03 Mike Frysinger <vapier@gentoo.org>
+ * wrapper.c (sim_target_parse_arg_array): Replace for loop with
+ a call to countargv.
+
+2016-01-03 Mike Frysinger <vapier@gentoo.org>
+
* configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete.
* configure: Regenerate.
diff --git a/sim/arm/wrapper.c b/sim/arm/wrapper.c
index 3938f3c..274b294 100644
--- a/sim/arm/wrapper.c
+++ b/sim/arm/wrapper.c
@@ -772,12 +772,7 @@ sim_target_parse_command_line (int argc, char ** argv)
static void
sim_target_parse_arg_array (char ** argv)
{
- int i;
-
- for (i = 0; argv[i]; i++)
- ;
-
- sim_target_parse_command_line (i, argv);
+ sim_target_parse_command_line (countargv (argv), argv);
}
static sim_cia