diff options
author | Mike Frysinger <vapier@gentoo.org> | 2016-01-03 01:40:46 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2016-01-03 04:08:56 -0500 |
commit | 34fed69938f1296b62354b2a825b49602fe7af50 (patch) | |
tree | aeece93f7f3f39429d4b92cb7e4e16a6217d8f64 /sim/erc32 | |
parent | aba6f46b235a3a139c04d5ed6a3310125aa9c982 (diff) | |
download | binutils-34fed69938f1296b62354b2a825b49602fe7af50.zip binutils-34fed69938f1296b62354b2a825b49602fe7af50.tar.gz binutils-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/ChangeLog | 4 | ||||
-rw-r--r-- | sim/erc32/interf.c | 3 |
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) { |