projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
567cc81
)
simplify getopt_long argv permutation loop logic
author
Rich Felker
<dalias@aerifal.cx>
Sat, 13 Dec 2014 19:22:58 +0000
(14:22 -0500)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 13 Dec 2014 19:22:58 +0000
(14:22 -0500)
src/misc/getopt_long.c
patch
|
blob
|
history
diff --git
a/src/misc/getopt_long.c
b/src/misc/getopt_long.c
index c3593716389c984d9200f63704f97b3cfaff876d..df2083bb26dd50404fa1aaaec45adab3d3e5417c 100644
(file)
--- a/
src/misc/getopt_long.c
+++ b/
src/misc/getopt_long.c
@@
-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;
}