summaryrefslogtreecommitdiff
path: root/avr/cmd_boot.c
diff options
context:
space:
mode:
authorLeo C2018-10-01 15:18:33 +0200
committerLeo C2018-10-01 15:18:33 +0200
commit52ef24e4020adcb773adcb0d82b1c2c385610461 (patch)
tree20ad11e1c5fd2222925af69cf8b43e49fd065123 /avr/cmd_boot.c
parentdbc1de70e1824cf1a649d892db5746b86b34b4e7 (diff)
downloadz180-stamp-52ef24e4020adcb773adcb0d82b1c2c385610461.zip
reset optind before executing command
Diffstat (limited to 'avr/cmd_boot.c')
-rw-r--r--avr/cmd_boot.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/avr/cmd_boot.c b/avr/cmd_boot.c
index e26a8b1..dcf834d 100644
--- a/avr/cmd_boot.c
+++ b/avr/cmd_boot.c
@@ -106,9 +106,6 @@ command_ret_t do_bootcf(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int a
memcpy_P(&boot_param, cfboot, sizeof boot_param);
default_stages = boot_param.stages;
- /* reset getopt() */
- optind = 0;
-
int opt;
while ((opt = getopt(argc, argv, PSTR("vna:s:c:t:i:"))) != -1) {
switch (opt) {
@@ -256,9 +253,6 @@ command_ret_t do_go(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, int argc,
uint32_t addr;
bool hold = 0;
- /* reset getopt() */
- optind = 0;
-
int opt;
while ((opt = getopt(argc, argv, PSTR("h"))) != -1) {
switch (opt) {