aboutsummaryrefslogtreecommitdiff
path: root/gdb/kod-cisco.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-11-29 14:41:34 +0000
committerAndrew Cagney <cagney@redhat.com>2000-11-29 14:41:34 +0000
commit2c67cb8b7a617d1a9ae00e29fc2983f0a3d3b68c (patch)
treeb4f798bd493d363f1767b5e4e8eed514f227f24d /gdb/kod-cisco.c
parentbe3ccd9c2b879034525ceceed75d60fb86648551 (diff)
downloadgdb-2c67cb8b7a617d1a9ae00e29fc2983f0a3d3b68c.zip
gdb-2c67cb8b7a617d1a9ae00e29fc2983f0a3d3b68c.tar.gz
gdb-2c67cb8b7a617d1a9ae00e29fc2983f0a3d3b68c.tar.bz2
Fix -Wuninitialized warnings.
Diffstat (limited to 'gdb/kod-cisco.c')
-rw-r--r--gdb/kod-cisco.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/kod-cisco.c b/gdb/kod-cisco.c
index bf97d67..0dffdb6 100644
--- a/gdb/kod-cisco.c
+++ b/gdb/kod-cisco.c
@@ -112,7 +112,7 @@ cisco_kod_request (char *arg, int from_tty)
int done = 0, i;
int fail = 0;
- char **sync_ids;
+ char **sync_ids = NULL;
int sync_len = 0;
int sync_next = 0;
char *prev_id = NULL;
@@ -216,12 +216,8 @@ cisco_kod_request (char *arg, int from_tty)
buffer[off + 8] = '\0';
off += 9;
- if (sync_len == 0)
- sync_ids = (char **) xmalloc (count * sizeof (char *));
- else
- sync_ids = (char **) xrealloc (sync_ids,
- (sync_len + count) * sizeof (char *));
sync_len += count;
+ sync_ids = (char **) xrealloc (sync_ids, sync_len * sizeof (char *));
for (i = 0; i < count; ++i)
{