From 0577ba8331080f57966d06e6aced1c061d228bb9 Mon Sep 17 00:00:00 2001 From: Edgar Grimberg Date: Sun, 23 Oct 2011 11:39:50 +0200 Subject: [PATCH] tms470: removed unnecessary operations MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/flash/nor/tms470.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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; } -- 2.39.5