From 0cb31fdf92f1ff6045ac28d1e50c87e5418e9859 Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Fri, 29 Dec 2006 09:46:35 +0000 Subject: * memory-map.c (memory_map_end_element): Move variable declarations to the begining of the block. --- gdb/memory-map.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'gdb/memory-map.c') diff --git a/gdb/memory-map.c b/gdb/memory-map.c index 991db1b..db4c22f 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') -- cgit v1.1