From: Mark Kettenis Date: Fri, 29 Dec 2006 09:46:35 +0000 (+0000) Subject: * memory-map.c (memory_map_end_element): Move variable X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0cb31fdf92f1ff6045ac28d1e50c87e5418e9859;p=binutils-gdb.git * memory-map.c (memory_map_end_element): Move variable declarations to the begining of the block. --- 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')