mirror of git://git.musl-libc.org/musl
simplify getopt_long argv permutation loop logic
This commit is contained in:
parent
567cc81c7e
commit
da16224fc5
|
@ -31,9 +31,7 @@ static int __getopt_long(int argc, char *const *argv, const char *optstring, con
|
|||
int i;
|
||||
for (i=optind; ; i++) {
|
||||
if (i >= argc || !argv[i]) return -1;
|
||||
if (argv[i][0] != '-') continue;
|
||||
if (!argv[i][1]) continue;
|
||||
break;
|
||||
if (argv[i][0] == '-' && argv[i][1]) break;
|
||||
}
|
||||
optind = i;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue