diff options
author | harti <harti@FreeBSD.org> | 2004-11-30 10:35:04 +0000 |
---|---|---|
committer | harti <harti@FreeBSD.org> | 2004-11-30 10:35:04 +0000 |
commit | 6660eab42ecbf5f10f97517f3a46dfa31524d47e (patch) | |
tree | 009d67340f3e579b03809d269f83135d9d851813 /usr.bin/make/dir.c | |
parent | 4671aabad620459d9378871b8537f7c8d53e4a18 (diff) | |
download | FreeBSD-src-6660eab42ecbf5f10f97517f3a46dfa31524d47e.zip FreeBSD-src-6660eab42ecbf5f10f97517f3a46dfa31524d47e.tar.gz |
Change a couple of the primitve list functions to be macros. This changes
the semantic of Lst_Datum which formerly returned NULL when the argument
node was NULL. There was only one place in the source that relied on this
so change that place.
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r-- | usr.bin/make/dir.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c index 137a21e..4f520e6 100644 --- a/usr.bin/make/dir.c +++ b/usr.bin/make/dir.c @@ -231,10 +231,12 @@ Dir_Init (void) void Dir_InitDot (void) { + LstNode ln; + Dir_AddDir (openDirectories, "."); - dot = (Path *)Lst_Datum(Lst_Last(openDirectories)); - if (dot == (Path *) NULL) + if ((ln = Lst_Last(openDirectories)) == NULL) err(1, "cannot open current directory"); + dot = Lst_Datum(ln); /* * We always need to have dot around, so we increment its reference count |