X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Flinux%2Fgetopt_long.c;h=6d3a4a6e644e5dc4ba3156ba3a7ce4a0c006c9cb;hb=780aede41913528781bbc8ff0d0e27505595f7c0;hp=d80cd1b67d2042e88607846ecb075bc17c6e6cff;hpb=0b44a0315b47dd8eced9f3b7f31580cf14bbfc01;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;