aboutsummaryrefslogtreecommitdiff
path: root/gdb/progspace.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/progspace.c')
-rw-r--r--gdb/progspace.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/gdb/progspace.c b/gdb/progspace.c
index 59a7846..9a622ed 100644
--- a/gdb/progspace.c
+++ b/gdb/progspace.c
@@ -133,16 +133,8 @@ add_program_space (struct address_space *aspace)
program_space_alloc_data (pspace);
- if (program_spaces == NULL)
- program_spaces = pspace;
- else
- {
- struct program_space *last;
-
- for (last = program_spaces; last->next != NULL; last = last->next)
- ;
- last->next = pspace;
- }
+ pspace->next = program_spaces;
+ program_spaces = pspace;
return pspace;
}