summaryrefslogtreecommitdiff
path: root/sim/erc32/interf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sim/erc32/interf.c')
-rw-r--r--sim/erc32/interf.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sim/erc32/interf.c b/sim/erc32/interf.c
index bfa4f72d7eb..7f3b8dfee8c 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) {