summaryrefslogtreecommitdiff
path: root/implicit.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 /implicit.c
parent50eb3cf5e5a8a68b68e966a6607f668f2c36191e (diff)
downloadgunmake-22886f8a74b5925030889fed52af5a8add5617d7.tar.gz
Fixed Savannah bug #16053.
Diffstat (limited to 'implicit.c')
-rw-r--r--implicit.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/implicit.c b/implicit.c
index 8085ea1..a5d3700 100644
--- a/implicit.c
+++ b/implicit.c
@@ -802,8 +802,7 @@ pattern_search (struct file *file, int archive,
while (dep != 0)
{
struct dep *next = dep->next;
- free (dep->name);
- free ((char *)dep);
+ free_dep (dep);
dep = next;
}
file->deps = 0;
@@ -862,15 +861,12 @@ pattern_search (struct file *file, int archive,
}
}
- dep = (struct dep *) xmalloc (sizeof (struct dep));
+ dep = alloc_dep ();
dep->ignore_mtime = d->ignore_mtime;
- dep->staticpattern = 0;
- dep->need_2nd_expansion = 0;
s = d->name; /* Hijacking the name. */
d->name = 0;
if (recursions == 0)
{
- dep->name = 0;
dep->file = lookup_file (s);
if (dep->file == 0)
/* enter_file consumes S's storage. */
@@ -883,9 +879,8 @@ pattern_search (struct file *file, int archive,
else
{
dep->name = s;
- dep->file = 0;
- dep->changed = 0;
}
+
if (d->intermediate_file == 0 && tryrules[foundrule]->terminal)
{
/* If the file actually existed (was not an intermediate file),
@@ -943,11 +938,9 @@ pattern_search (struct file *file, int archive,
if (i != matches[foundrule])
{
struct file *f;
- struct dep *new = (struct dep *) xmalloc (sizeof (struct dep));
+ struct dep *new = alloc_dep ();
+
/* GKM FIMXE: handle '|' here too */
- new->ignore_mtime = 0;
- new->staticpattern = 0;
- new->need_2nd_expansion = 0;
new->name = p = (char *) xmalloc (rule->lens[i] + fullstemlen + 1);
bcopy (rule->targets[i], p,
rule->suffixes[i] - rule->targets[i] - 1);