summaryrefslogtreecommitdiff
path: root/variable.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2006-02-21 05:21:19 +0000
committerPaul Smith <psmith@gnu.org>2006-02-21 05:21:19 +0000
commita179091273e3a786c6fccd2ebd318e846af1475a (patch)
tree1610e1b28335c7dc70b523f5442366b127f00837 /variable.c
parent709cce940b5a74157d4a721acaa585f3c1f24026 (diff)
downloadmake-a179091273e3a786c6fccd2ebd318e846af1475a.tar.gz
Fix a potential core dump when merging aliases. Might fix bug #15818.
Revert intermediate file free code. Suppress some warnings in VMS builds.
Diffstat (limited to 'variable.c')
-rw-r--r--variable.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/variable.c b/variable.c
index 39f0adaa..54bbc02a 100644
--- a/variable.c
+++ b/variable.c
@@ -674,16 +674,17 @@ merge_variable_set_lists (struct variable_set_list **setlist0,
/* This loop relies on the fact that all setlists terminate with the global
setlist (before NULL). If that's not true, arguably we SHOULD die. */
- while (setlist1 != &global_setlist && to != &global_setlist)
- {
- struct variable_set_list *from = setlist1;
- setlist1 = setlist1->next;
+ if (to)
+ while (setlist1 != &global_setlist && to != &global_setlist)
+ {
+ struct variable_set_list *from = setlist1;
+ setlist1 = setlist1->next;
- merge_variable_sets (to->set, from->set);
+ merge_variable_sets (to->set, from->set);
- last0 = to;
- to = to->next;
- }
+ last0 = to;
+ to = to->next;
+ }
if (setlist1 != &global_setlist)
{