From 53d77633dcd188e045dbe303946e4f7b45444691 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 6 Jan 2014 12:08:19 +0000 Subject: 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) --- usr.bin/make/suff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'usr.bin/make/suff.c') 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; } /*- -- cgit v1.2.3