summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@kolpackov.net>2006-03-17 14:24:20 +0000
committerBoris Kolpackov <boris@kolpackov.net>2006-03-17 14:24:20 +0000
commit22886f8a74b5925030889fed52af5a8add5617d7 (patch)
treec28340c4ca8f7956e259f671b3202b6bf0874a35 /main.c
parent50eb3cf5e5a8a68b68e966a6607f668f2c36191e (diff)
downloadgunmake-22886f8a74b5925030889fed52af5a8add5617d7.tar.gz
Fixed Savannah bug #16053.
Diffstat (limited to 'main.c')
-rw-r--r--main.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/main.c b/main.c
index a645e44..53a2e2e 100644
--- a/main.c
+++ b/main.c
@@ -1850,7 +1850,7 @@ main (int argc, char **argv, char **envp)
last->next = d->next;
/* Free the storage. */
- free ((char *) d);
+ free_dep (d);
d = last == 0 ? read_makefiles : last->next;
@@ -2172,12 +2172,7 @@ main (int argc, char **argv, char **envp)
}
}
- goals = (struct dep *) xmalloc (sizeof (struct dep));
- goals->next = 0;
- goals->name = 0;
- goals->ignore_mtime = 0;
- goals->staticpattern = 0;
- goals->need_2nd_expansion = 0;
+ goals = alloc_dep ();
goals->file = default_goal_file;
}
}
@@ -2333,19 +2328,16 @@ handle_non_switch_argument (char *arg, int env)
if (goals == 0)
{
- goals = (struct dep *) xmalloc (sizeof (struct dep));
+ goals = alloc_dep ();
lastgoal = goals;
}
else
{
- lastgoal->next = (struct dep *) xmalloc (sizeof (struct dep));
+ lastgoal->next = alloc_dep ();
lastgoal = lastgoal->next;
}
- lastgoal->name = 0;
+
lastgoal->file = f;
- lastgoal->ignore_mtime = 0;
- lastgoal->staticpattern = 0;
- lastgoal->need_2nd_expansion = 0;
{
/* Add this target name to the MAKECMDGOALS variable. */