From bc67c6720b246652bc0915b1b6d036ada6c85fda Mon Sep 17 00:00:00 2001 From: oharboe Date: Mon, 3 Mar 2008 15:58:17 +0000 Subject: I fixed all the targets even though I could only prove that XScale was busted. git-svn-id: svn://svn.berlios.de/openocd/trunk@437 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/target/arm720t.c | 1 + src/target/arm7tdmi.c | 1 + src/target/arm920t.c | 1 + src/target/arm926ejs.c | 1 + src/target/arm966e.c | 1 + src/target/arm9tdmi.c | 1 + src/target/cortex_m3.c | 1 + src/target/feroceon.c | 1 + src/target/xscale.c | 1 + 9 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/target/arm720t.c b/src/target/arm720t.c index 2c7e2aea..9a3f5617 100644 --- a/src/target/arm720t.c +++ b/src/target/arm720t.c @@ -447,6 +447,7 @@ int arm720t_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm720t_common_t *arm720t = malloc(sizeof(arm720t_common_t)); + memset(arm720t, 0, sizeof(*arm720t)); if (argc < 4) { diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c index d8d5e57e..22064ea7 100644 --- a/src/target/arm7tdmi.c +++ b/src/target/arm7tdmi.c @@ -845,6 +845,7 @@ int arm7tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char * int chain_pos; char *variant = NULL; arm7tdmi_common_t *arm7tdmi = malloc(sizeof(arm7tdmi_common_t)); + memset(arm7tdmi, 0, sizeof(*arm7tdmi)); if (argc < 4) { diff --git a/src/target/arm920t.c b/src/target/arm920t.c index e9a109a5..43d48152 100644 --- a/src/target/arm920t.c +++ b/src/target/arm920t.c @@ -714,6 +714,7 @@ int arm920t_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm920t_common_t *arm920t = malloc(sizeof(arm920t_common_t)); + memset(arm920t, 0, sizeof(*arm920t)); if (argc < 4) { diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c index afe9226c..87603bca 100644 --- a/src/target/arm926ejs.c +++ b/src/target/arm926ejs.c @@ -702,6 +702,7 @@ int arm926ejs_target_command(struct command_context_s *cmd_ctx, char *cmd, char int chain_pos; char *variant = NULL; arm926ejs_common_t *arm926ejs = malloc(sizeof(arm926ejs_common_t)); + memset(arm926ejs, 0, sizeof(*arm926ejs)); if (argc < 4) { diff --git a/src/target/arm966e.c b/src/target/arm966e.c index 4ba5d852..2b3f86a4 100644 --- a/src/target/arm966e.c +++ b/src/target/arm966e.c @@ -125,6 +125,7 @@ int arm966e_target_command(struct command_context_s *cmd_ctx, char *cmd, char ** int chain_pos; char *variant = NULL; arm966e_common_t *arm966e = malloc(sizeof(arm966e_common_t)); + memset(arm966e, 0, sizeof(*arm966e)); if (argc < 4) { diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c index 595790bc..0778c4b7 100644 --- a/src/target/arm9tdmi.c +++ b/src/target/arm9tdmi.c @@ -988,6 +988,7 @@ int arm9tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char * int chain_pos; char *variant = NULL; arm9tdmi_common_t *arm9tdmi = malloc(sizeof(arm9tdmi_common_t)); + memset(arm9tdmi, 0, sizeof(*arm9tdmi)); if (argc < 4) { diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c index 91911f9e..964c6b8c 100644 --- a/src/target/cortex_m3.c +++ b/src/target/cortex_m3.c @@ -1481,6 +1481,7 @@ int cortex_m3_target_command(struct command_context_s *cmd_ctx, char *cmd, char int chain_pos; char *variant = NULL; cortex_m3_common_t *cortex_m3 = malloc(sizeof(cortex_m3_common_t)); + memset(cortex_m3, 0, sizeof(*cortex_m3)); if (argc < 4) { diff --git a/src/target/feroceon.c b/src/target/feroceon.c index 5346a14d..efe12896 100644 --- a/src/target/feroceon.c +++ b/src/target/feroceon.c @@ -609,6 +609,7 @@ int feroceon_target_command(struct command_context_s *cmd_ctx, char *cmd, char * armv4_5_common_t *armv4_5; arm7_9_common_t *arm7_9; arm926ejs_common_t *arm926ejs = malloc(sizeof(arm926ejs_common_t)); + memset(arm926ejs, 0, sizeof(*arm926ejs)); if (argc < 4) { diff --git a/src/target/xscale.c b/src/target/xscale.c index 27cd75c8..30b25cb7 100644 --- a/src/target/xscale.c +++ b/src/target/xscale.c @@ -3145,6 +3145,7 @@ int xscale_target_command(struct command_context_s *cmd_ctx, char *cmd, char **a int chain_pos; char *variant = NULL; xscale_common_t *xscale = malloc(sizeof(xscale_common_t)); + memset(xscale, 0, sizeof(*xscale)); if (argc < 5) { -- cgit v1.2.3