From 0cb31fdf92f1ff6045ac28d1e50c87e5418e9859 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 29 Dec 2006 09:46:35 +0000 Subject: [PATCH] * memory-map.c (memory_map_end_element): Move variable declarations to the begining of the block. --- gdb/ChangeLog | 5 +++++ gdb/memory-map.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 04e96a6bab0..ced7ede0042 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2006-12-29 Mark Kettenis + + * memory-map.c (memory_map_end_element): Move variable + declarations to the begining of the block. + 2006-12-28 Daniel Jacobowitz * ia64-tdep.c (get_kernel_table): Correct signedness in check diff --git a/gdb/memory-map.c b/gdb/memory-map.c index 991db1bf91b..db4c22f8ee1 100644 --- a/gdb/memory-map.c +++ b/gdb/memory-map.c @@ -141,10 +141,11 @@ memory_map_end_element (void *data_, const XML_Char *name) { if (strcmp (data->property_name, "blocksize") == 0) { + char *end = NULL; + if (!data->character_data) throw_error (XML_PARSE_ERROR, _("Empty content of 'property' element")); - char *end = NULL; data->currently_parsing->attrib.blocksize = strtoul (data->character_data, &end, 0); if (*end != '\0') -- 2.30.2