From 835ad3a984c5590ae4f6c94f2f0781ea049d1ae8 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Wed, 12 Apr 2017 00:58:46 +0300 Subject: libbb: GETOPT_RESET macro Signed-off-by: Kaarle Ritvanen Signed-off-by: Denys Vlasenko --- util-linux/getopt.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'util-linux') diff --git a/util-linux/getopt.c b/util-linux/getopt.c index 63294c520..79d54854b 100644 --- a/util-linux/getopt.c +++ b/util-linux/getopt.c @@ -246,12 +246,7 @@ static int generate_output(char **argv, int argc, const char *optstr, const stru /* We used it already in main() in getopt32(), * we *must* reset getopt(3): */ -#ifdef __GLIBC__ - optind = 0; -#else /* BSD style */ - optind = 1; - /* optreset = 1; */ -#endif + GETOPT_RESET(); while (1) { #if ENABLE_FEATURE_GETOPT_LONG -- cgit v1.2.3