aboutsummaryrefslogtreecommitdiff
path: root/sim/erc32
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/erc32
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/erc32')
-rw-r--r--sim/erc32/ChangeLog4
-rw-r--r--sim/erc32/interf.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/sim/erc32/ChangeLog b/sim/erc32/ChangeLog
index d47549a..17267f4 100644
--- a/sim/erc32/ChangeLog
+++ b/sim/erc32/ChangeLog
@@ -1,5 +1,9 @@
2016-01-03 Mike Frysinger <vapier@gentoo.org>
+ * interf.c (sim_open): Replace while loop with a call to countargv.
+
+2016-01-03 Mike Frysinger <vapier@gentoo.org>
+
* configure.ac (SIM_AC_OPTION_HOSTENDIAN): Delete.
* configure: Regenerate.
* exec.c (fpexec): Rename CURRENT_HOST_BYTE_ORDER to
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index bfa4f72..7f3b8df 100644
--- a/sim/erc32/interf.c
+++ b/sim/erc32/interf.c
@@ -171,8 +171,7 @@ sim_open (kind, callback, abfd, argv)
sim_callback = callback;
- while (argv[argc])
- argc++;
+ argc = countargv (argv);
while (stat < argc) {
if (argv[stat][0] == '-') {
if (strcmp(argv[stat], "-v") == 0) {