This is an automated email from Gerrit.

Anonymous Coward (edgar.grimb...@gmail.com) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/52

-- gerrit

commit fb14b9741d1200a5e3e14523c1abdf9314e2a36f
Author: Edgar Grimberg <edgar.grimb...@gmail.com>
Date:   Sun Oct 23 11:39:50 2011 +0200

    tms470: removed unnecessary operations
    
    This should silence a warning.
    
    Change-Id: Id91a9ebacae836083b1db2654a8e7bf24b2300e9
    Signed-off-by: Edgar Grimberg <edgar.grimb...@gmail.com>

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;
 }

-- 
_______________________________________________
Openocd-development mailing list
Openocd-development@lists.berlios.de
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to