summaryrefslogtreecommitdiff
path: root/implicit.c
diff options
context:
space:
mode:
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);