simplify getopt_long argv permutation loop logic

This commit is contained in:
Rich Felker 2014-12-13 14:22:58 -05:00
parent 567cc81c7e
commit da16224fc5
1 changed files with 1 additions and 3 deletions

View File

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