From: Edgar Grimberg Date: Sun, 23 Oct 2011 09:39:50 +0000 (+0200) Subject: tms470: removed unnecessary operations X-Git-Tag: v0.6.0-rc1~517 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0577ba8331080f57966d06e6aced1c061d228bb9;p=openocd tms470: removed unnecessary operations This should silence a warning. Change-Id: Id91a9ebacae836083b1db2654a8e7bf24b2300e9 Signed-off-by: Edgar Grimberg Reviewed-on: http://openocd.zylin.com/52 Tested-by: jenkins Reviewed-by: Øyvind Harboe --- diff --git a/src/flash/nor/tms470.c b/src/flash/nor/tms470.c index dd9ff5b4..359d3aa7 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; }