diff options
| author | pk <pk@NetBSD.org> | 2002-03-12 23:52:35 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 2002-03-12 23:52:35 +0000 |
| commit | 605f6cf148394b2dba262e0b91f37ff35ecafe76 (patch) | |
| tree | 3846d2912abdf706ed5c3ae9a84465e56ee4c766 /usr.bin/make/make.c | |
| parent | 9588aa8fef4616f0fa03766a25867062d70770ce (diff) | |
MakeAddAllSrc(): check for empty .ALLSRC variable before using its value.
Diffstat (limited to 'usr.bin/make/make.c')
| -rw-r--r-- | usr.bin/make/make.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/make/make.c b/usr.bin/make/make.c index 8ec5e8dee92..396b340465f 100644 --- a/usr.bin/make/make.c +++ b/usr.bin/make/make.c @@ -1,4 +1,4 @@ -/* $NetBSD: make.c,v 1.45 2002/03/08 23:22:38 pk Exp $ */ +/* $NetBSD: make.c,v 1.46 2002/03/12 23:52:35 pk Exp $ */ /* * Copyright (c) 1988, 1989, 1990, 1993 @@ -39,14 +39,14 @@ */ #ifdef MAKE_BOOTSTRAP -static char rcsid[] = "$NetBSD: make.c,v 1.45 2002/03/08 23:22:38 pk Exp $"; +static char rcsid[] = "$NetBSD: make.c,v 1.46 2002/03/12 23:52:35 pk Exp $"; #else #include <sys/cdefs.h> #ifndef lint #if 0 static char sccsid[] = "@(#)make.c 8.1 (Berkeley) 6/6/93"; #else -__RCSID("$NetBSD: make.c,v 1.45 2002/03/08 23:22:38 pk Exp $"); +__RCSID("$NetBSD: make.c,v 1.46 2002/03/12 23:52:35 pk Exp $"); #endif #endif /* not lint */ #endif @@ -756,7 +756,8 @@ MakeAddAllSrc (cgnp, pgnp) } else { allsrc = child; } - Var_Append (ALLSRC, allsrc, pgn); + if (allsrc != NULL) + Var_Append (ALLSRC, allsrc, pgn); if (p2) free(p2); if (pgn->type & OP_JOIN) { |
