diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2014-01-06 12:08:19 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2014-01-06 12:08:19 +0000 |
commit | 53d77633dcd188e045dbe303946e4f7b45444691 (patch) | |
tree | 8c34f7f70604c4e8ff1dc3fa4fc34cc23fe818f8 /usr.bin/make/suff.c | |
parent | e5169a22fd4ca170c26db0c909d62ce50aa9e4dc (diff) |
fix error messages, avoid dereferencing null pointers.
- the code becomes too indented, pull it into a separate function
- add an extra hint, the current_gnode.
- specifically, variables may be expanded during
target: prereq solving in Suff_FindDeps, this is after parsing,
not during command execution, and the only actual indication with have is
that we're resolving a prereq of.
(this ought to fix mk35, and partially solve mk34)
Diffstat (limited to 'usr.bin/make/suff.c')
-rw-r--r-- | usr.bin/make/suff.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c index 618c64febb6..e26eb652970 100644 --- a/usr.bin/make/suff.c +++ b/usr.bin/make/suff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: suff.c,v 1.86 2013/11/22 15:47:35 espie Exp $ */ +/* $OpenBSD: suff.c,v 1.87 2014/01/06 12:08:18 espie Exp $ */ /* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */ /* @@ -1668,10 +1668,12 @@ SuffFindDeps(GNode *gn, Lst slst) if (DEBUG(SUFF)) printf("SuffFindDeps (%s)\n", gn->name); + current_node = gn; if (gn->type & OP_ARCHV) SuffFindArchiveDeps(gn, slst); else SuffFindNormalDeps(gn, slst); + current_node = NULL; } /*- |