This is an automated email from Gerrit.

?yvind Harboe (oyvindhar...@gmail.com) just uploaded a new patch set to Gerrit, 
which you can find at http://openocd.zylin.com/47

-- gerrit
commit 22d28c08fc5f0d8ef9a87dd5c9588a6e027b54b0
Author: Øyvind Harboe <oyvind.har...@zylin.com>
Date:   Sat Oct 22 01:09:32 2011 +0200

    kinetis: fix warning about malloc(0) w/assert
    
    Change-Id: Ib40204675bfc5429c744f9ed7e2f7098384b753d
    Signed-off-by: Øyvind Harboe <oyvind.har...@zylin.com>

diff --git a/src/flash/nor/kinetis.c b/src/flash/nor/kinetis.c
index 2613522..ecc60be 100644
--- a/src/flash/nor/kinetis.c
+++ b/src/flash/nor/kinetis.c
@@ -467,6 +467,7 @@ static int kinetis_probe(struct flash_bank *bank)
        }
 
        bank->num_sectors = bank->size / (2 * 1024);
+       assert(bank->num_sectors > 0);
        bank->sectors = malloc(sizeof(struct flash_sector) * bank->num_sectors);
 
        for (i = 0; i < bank->num_sectors; i++) {

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

Reply via email to