* memory-map.c (memory_map_end_element): Move variable
authorMark Kettenis <kettenis@gnu.org>
Fri, 29 Dec 2006 09:46:35 +0000 (09:46 +0000)
committerMark Kettenis <kettenis@gnu.org>
Fri, 29 Dec 2006 09:46:35 +0000 (09:46 +0000)
declarations to the begining of the block.

gdb/ChangeLog
gdb/memory-map.c

index 04e96a6..ced7ede 100644 (file)
@@ -1,3 +1,8 @@
+2006-12-29  Mark Kettenis  <kettenis@gnu.org>
+
+       * memory-map.c (memory_map_end_element): Move variable
+       declarations to the begining of the block.
+
 2006-12-28  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * ia64-tdep.c (get_kernel_table): Correct signedness in check
 2006-12-28  Daniel Jacobowitz  <dan@codesourcery.com>
 
        * ia64-tdep.c (get_kernel_table): Correct signedness in check
index 991db1b..db4c22f 100644 (file)
@@ -141,10 +141,11 @@ memory_map_end_element (void *data_, const XML_Char *name)
        {
          if (strcmp (data->property_name, "blocksize") == 0)
            {
        {
          if (strcmp (data->property_name, "blocksize") == 0)
            {
+             char *end = NULL;
+
              if (!data->character_data)
                throw_error (XML_PARSE_ERROR,
                             _("Empty content of 'property' element"));
              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')
              data->currently_parsing->attrib.blocksize
                = strtoul (data->character_data, &end, 0);
              if (*end != '\0')