X-Git-Url: http://cloudbase.mooo.com/gitweb/z180-stamp.git/blobdiff_plain/2c60e1dc26e1f424d9673541aebe778601070838..49475345ffc5fd27ca937006ef6aa18858bf7c90:/avr/env.c?ds=sidebyside diff --git a/avr/env.c b/avr/env.c index 8896004..900f689 100644 --- a/avr/env.c +++ b/avr/env.c @@ -63,6 +63,7 @@ char env_get_char(uint_fast16_t index) switch (env_valid) { case 2: off += CONFIG_ENV_SIZE; + /* FALL TROUGH */ case 1: ret = (char) eeprom_read_byte((const uint8_t *)off + index + offsetof(env_t, data)); @@ -716,8 +717,8 @@ command_ret_t do_env_print(cmd_tbl_t *cmdtp UNUSED, uint_fast8_t flag UNUSED, /* print selected env vars */ while (optind < argc) { - int rc = env_print(argv[optind], mode); - if (rc < 0) { + int len = env_print(argv[optind], mode); + if (len < 0) { printf_P(PSTR("## Error: \"%s\" not defined\n"), argv[optind]); rc = CMD_RET_FAILURE; }