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 --- shell/shell_common.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'shell/shell_common.c') diff --git a/shell/shell_common.c b/shell/shell_common.c index 549b17ca1..fb86e680f 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c @@ -401,13 +401,7 @@ shell_builtin_ulimit(char **argv) /* In case getopt was already called: * reset the libc getopt() function, which keeps internal state. */ -#ifdef __GLIBC__ - optind = 0; -#else /* BSD style */ - optind = 1; - /* optreset = 1; */ -#endif - /* optarg = NULL; opterr = 0; optopt = 0; - do we need this?? */ + GETOPT_RESET(); argc = 1; while (argv[argc]) -- cgit v1.2.3