diff options
author | Andrew Cagney <cagney@redhat.com> | 2000-11-29 14:41:34 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2000-11-29 14:41:34 +0000 |
commit | 92758b4ff8b38a6127324a7971d9253da5f5af7b (patch) | |
tree | aea0036581a613ca2e23b14dcb8e5cf65a78c878 /gdb/kod-cisco.c | |
parent | 5616f06325add11b17b8283880c1a9b29f4e8888 (diff) | |
download | gdb-92758b4ff8b38a6127324a7971d9253da5f5af7b.tar.gz |
Fix -Wuninitialized warnings.
Diffstat (limited to 'gdb/kod-cisco.c')
-rw-r--r-- | gdb/kod-cisco.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/kod-cisco.c b/gdb/kod-cisco.c index bf97d6741d6..0dffdb67fcd 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) { |