diff options
-rw-r--r-- | src/flash/nor/tms470.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index dd9ff5b..359d3aa 100644 --- a/src/flash/nor/tms470.c +++ b/src/flash/nor/tms470.c @@ -1244,13 +1244,11 @@ static int get_tms470_info(struct flash_bank *bank, char *buf, int buf_size) return ERROR_FLASH_OPERATION_FAILED; } - used += snprintf(buf, buf_size, "\ntms470 information: Chip is %s\n", tms470_info->part_name); + used = snprintf(buf, buf_size, "\ntms470 information: Chip is %s\n", tms470_info->part_name); buf += used; buf_size -= used; - used += snprintf(buf, buf_size, "Flash protection level 2 is %s\n", tms470_check_flash_unlocked(bank->target) == ERROR_OK ? "disabled" : "enabled"); - buf += used; - buf_size -= used; + snprintf(buf, buf_size, "Flash protection level 2 is %s\n", tms470_check_flash_unlocked(bank->target) == ERROR_OK ? "disabled" : "enabled"); return ERROR_OK; } |