summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-12-16 15:55:48 +0000
committermifi <mifi@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2007-12-16 15:55:48 +0000
commitb642f4219916b1f7eb74ddfd91ac40c43ae85133 (patch)
treee539aafb07df027c360590d38c3cef75d7deeecc
parentc8490c2099e645418ac96e7840828826cf1121ac (diff)
downloadopenocd_libswd-b642f4219916b1f7eb74ddfd91ac40c43ae85133.tar.gz
openocd_libswd-b642f4219916b1f7eb74ddfd91ac40c43ae85133.tar.bz2
openocd_libswd-b642f4219916b1f7eb74ddfd91ac40c43ae85133.tar.xz
openocd_libswd-b642f4219916b1f7eb74ddfd91ac40c43ae85133.zip
- initialize num_sectors and sectors in handle_flash_bank_command.
(thanks to oyvind Harboe for this hint) git-svn-id: svn://svn.berlios.de/openocd/trunk@233 b42882b7-edfa-0310-969c-e2dbd0fdcd60
-rw-r--r--src/flash/flash.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/flash/flash.c b/src/flash/flash.c
index 390e37ad..6c1fbd91 100644
--- a/src/flash/flash.c
+++ b/src/flash/flash.c
@@ -176,7 +176,9 @@ int handle_flash_bank_command(struct command_context_s *cmd_ctx, char *cmd, char
c->base = strtoul(args[1], NULL, 0);
c->size = strtoul(args[2], NULL, 0);
c->chip_width = strtoul(args[3], NULL, 0);
- c->bus_width = strtoul(args[4], NULL, 0);
+ c->bus_width = strtoul(args[4], NULL, 0);
+ c->num_sectors = 0;
+ c->sectors = NULL;
c->next = NULL;
if (flash_drivers[i]->flash_bank_command(cmd_ctx, cmd, args, argc, c) != ERROR_OK)