Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/getopt32.c')
-rw-r--r--libbb/getopt32.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libbb/getopt32.c b/libbb/getopt32.c
index b87b83538..80f4cc060 100644
--- a/libbb/getopt32.c
+++ b/libbb/getopt32.c
@@ -379,9 +379,7 @@ getopt32(char **argv, const char *applet_opts, ...)
int spec_flgs = 0;
/* skip 0: some applets cheat: they do not actually HAVE argv[0] */
- argc = 1;
- while (argv[argc])
- argc++;
+ argc = 1 + string_array_len(argv + 1);
va_start(p, applet_opts);