simplify getopt_long argv permutation loop logic
This commit is contained in:
1 parent
567cc81c7e
commit
da16224fc5
1 file changed
+1
-3
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user