X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fmisc%2Fgetopt_long.c;h=480c00139e08682fd15d5798d871be4c85111b76;hb=43e9f652bf4b2195b04fc14c93db591b30a7b790;hp=e5a4a75adcb94740901a03a3465a9ce47f02114c;hpb=0217ed72f986d78b177f1a014e93f2150105bb44;p=musl diff --git a/src/misc/getopt_long.c b/src/misc/getopt_long.c index e5a4a75a..480c0013 100644 --- a/src/misc/getopt_long.c +++ b/src/misc/getopt_long.c @@ -23,7 +23,6 @@ static int __getopt_long_core(int argc, char *const *argv, const char *optstring static int __getopt_long(int argc, char *const *argv, const char *optstring, const struct option *longopts, int *idx, int longonly) { int ret, skipped, resumed; - const char *optstring2 = optstring + 1; if (!optind || __optreset) { __optreset = 0; __optpos = 0; @@ -38,10 +37,9 @@ static int __getopt_long(int argc, char *const *argv, const char *optstring, con if (argv[i][0] == '-' && argv[i][1]) break; } optind = i; - optstring2 = optstring; } resumed = optind; - ret = __getopt_long_core(argc, argv, optstring2, longopts, idx, longonly); + ret = __getopt_long_core(argc, argv, optstring, longopts, idx, longonly); if (resumed > skipped) { int i, cnt = optind-resumed; for (i=0; i