projects
/
musl
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add syscall wrapper for flock
[musl]
/
src
/
linux
/
getopt_long.c
diff --git
a/src/linux/getopt_long.c
b/src/linux/getopt_long.c
index
d80cd1b
..
6d3a4a6
100644
(file)
--- a/
src/linux/getopt_long.c
+++ b/
src/linux/getopt_long.c
@@
-14,7
+14,7
@@
static int __getopt_long(int argc, char *const *argv, const char *optstring, con
const char *name = longopts[i].name;
char *opt = argv[optind]+1;
if (*opt == '-') opt++;
const char *name = longopts[i].name;
char *opt = argv[optind]+1;
if (*opt == '-') opt++;
-
while (*name && *name++ == *
opt++);
+
for (; *name && *name == *opt; name++,
opt++);
if (*name || (*opt && *opt != '=')) continue;
if (*opt == '=') {
if (!longopts[i].has_arg) continue;
if (*name || (*opt && *opt != '=')) continue;
if (*opt == '=') {
if (!longopts[i].has_arg) continue;