diff options
author | Edgar Grimberg <edgar.grimberg@gmail.com> | 2011-10-23 11:39:50 +0200 |
---|---|---|
committer | Øyvind Harboe <oyvindharboe@gmail.com> | 2011-10-23 11:34:05 +0000 |
commit | 0577ba8331080f57966d06e6aced1c061d228bb9 (patch) | |
tree | c1ff0760ca512a64ca413244f31113ce33b33cd6 /src/flash/nor | |
parent | 811f7d3f7eb0a2f40406949e21d7f2ab577d2d46 (diff) | |
download | riscv-openocd-0577ba8331080f57966d06e6aced1c061d228bb9.zip riscv-openocd-0577ba8331080f57966d06e6aced1c061d228bb9.tar.gz riscv-openocd-0577ba8331080f57966d06e6aced1c061d228bb9.tar.bz2 |
tms470: removed unnecessary operations
This should silence a warning.
Change-Id: Id91a9ebacae836083b1db2654a8e7bf24b2300e9
Signed-off-by: Edgar Grimberg <edgar.grimberg@gmail.com>
Reviewed-on: http://openocd.zylin.com/52
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
Diffstat (limited to 'src/flash/nor')
-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; } |