fixes for bugs found by make_single_applets.sh

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko
2017-07-03 21:31:16 +02:00
parent 2e989ef232
commit d4e4fdb5ce
10 changed files with 75 additions and 41 deletions

View File

@ -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);