From 52ef24e4020adcb773adcb0d82b1c2c385610461 Mon Sep 17 00:00:00 2001 From: Leo C Date: Mon, 1 Oct 2018 15:18:33 +0200 Subject: reset optind before executing command --- avr/cmd_gpio.c | 3 --- 1 file changed, 3 deletions(-) (limited to 'avr/cmd_gpio.c') diff --git a/avr/cmd_gpio.c b/avr/cmd_gpio.c index 65a71be..549654f 100644 --- a/avr/cmd_gpio.c +++ b/avr/cmd_gpio.c @@ -173,9 +173,6 @@ command_ret_t do_gpio(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int arg uint_fast8_t pinarg[GPIO_MAX]; uint_fast8_t pinargc; - /* reset getopt() */ - optind = 0; - int opt; while ((opt = getopt(argc, argv, PSTR("s"))) != -1) { switch (opt) { -- cgit v1.2.3