X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Flinux%2Fgetopt_long.c;h=6d3a4a6e644e5dc4ba3156ba3a7ce4a0c006c9cb;hb=6f0259a4fc7d827db027fe122377687ef780e17c;hp=d80cd1b67d2042e88607846ecb075bc17c6e6cff;hpb=45a3219944f03ece5742b6aecb79b6dc7c9ac0bb;p=musl diff --git a/src/linux/getopt_long.c b/src/linux/getopt_long.c index d80cd1b6..6d3a4a6e 100644 --- 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++; - while (*name && *name++ == *opt++); + for (; *name && *name == *opt; name++, opt++); if (*name || (*opt && *opt != '=')) continue; if (*opt == '=') { if (!longopts[i].has_arg) continue;