summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/dir.c
diff options
context:
space:
mode:
authorwill <will@FreeBSD.org>2000-12-02 18:58:01 +0000
committerwill <will@FreeBSD.org>2000-12-02 18:58:01 +0000
commit797262c9e92824a19005f56e85cd3f19b8273f9b (patch)
tree7680565ed1402e4003087d01cf0b545aee3b625e /usr.bin/make/dir.c
parentd04b66b7bc8243e8d0f41b0ec49287b046f7896c (diff)
downloadFreeBSD-src-797262c9e92824a19005f56e85cd3f19b8273f9b.zip
FreeBSD-src-797262c9e92824a19005f56e85cd3f19b8273f9b.tar.gz
There's no reason to use fancy forms of NULL. Replace all instances
of NIL, NILLST, NILLGNODE, etc. with NULL. Obtained from: OpenBSD
Diffstat (limited to 'usr.bin/make/dir.c')
-rw-r--r--usr.bin/make/dir.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/usr.bin/make/dir.c b/usr.bin/make/dir.c
index b5b762a..fdfe772 100644
--- a/usr.bin/make/dir.c
+++ b/usr.bin/make/dir.c
@@ -496,7 +496,7 @@ DirExpandInt(word, path, expansions)
Path *p; /* Directory in the node */
if (Lst_Open(path) == SUCCESS) {
- while ((ln = Lst_Next(path)) != NILLNODE) {
+ while ((ln = Lst_Next(path)) != NULL) {
p = (Path *)Lst_Datum(ln);
DirMatchFiles(word, p, expansions);
}
@@ -722,7 +722,7 @@ Dir_FindFile (name, path)
* and return the resulting string. If we don't find any such thing,
* we go on to phase two...
*/
- while ((ln = Lst_Next (path)) != NILLNODE) {
+ while ((ln = Lst_Next (path)) != NULL) {
p = (Path *) Lst_Datum (ln);
if (DEBUG(DIR)) {
printf("%s...", p->name);
@@ -806,7 +806,7 @@ Dir_FindFile (name, path)
printf("failed. Trying subdirectories...");
}
(void) Lst_Open (path);
- while ((ln = Lst_Next (path)) != NILLNODE) {
+ while ((ln = Lst_Next (path)) != NULL) {
p = (Path *) Lst_Datum (ln);
if (p != dot) {
file = str_concat (p->name, name, STR_ADDSLASH);
@@ -903,7 +903,7 @@ Dir_FindFile (name, path)
bigmisses += 1;
ln = Lst_Last (path);
- if (ln == NILLNODE) {
+ if (ln == NULL) {
return ((char *) NULL);
} else {
p = (Path *) Lst_Datum (ln);
@@ -1036,9 +1036,9 @@ Dir_AddDir (path, name)
register struct dirent *dp; /* entry in directory */
ln = Lst_Find (openDirectories, (ClientData)name, DirFindName);
- if (ln != NILLNODE) {
+ if (ln != NULL) {
p = (Path *)Lst_Datum (ln);
- if (Lst_Member(path, (ClientData)p) == NILLNODE) {
+ if (Lst_Member(path, (ClientData)p) == NULL) {
p->refCount += 1;
(void)Lst_AtEnd (path, (ClientData)p);
}
@@ -1137,7 +1137,7 @@ Dir_MakeFlags (flag, path)
str = estrdup ("");
if (Lst_Open (path) == SUCCESS) {
- while ((ln = Lst_Next (path)) != NILLNODE) {
+ while ((ln = Lst_Next (path)) != NULL) {
p = (Path *) Lst_Datum (ln);
tstr = str_concat (flag, p->name, 0);
str = str_concat (str, tstr, STR_ADDSPACE | STR_DOFREE);
@@ -1230,9 +1230,9 @@ Dir_Concat(path1, path2)
LstNode ln;
Path *p;
- for (ln = Lst_First(path2); ln != NILLNODE; ln = Lst_Succ(ln)) {
+ for (ln = Lst_First(path2); ln != NULL; ln = Lst_Succ(ln)) {
p = (Path *)Lst_Datum(ln);
- if (Lst_Member(path1, (ClientData)p) == NILLNODE) {
+ if (Lst_Member(path1, (ClientData)p) == NULL) {
p->refCount += 1;
(void)Lst_AtEnd(path1, (ClientData)p);
}
@@ -1253,7 +1253,7 @@ Dir_PrintDirectories()
hits * 100 / (hits + bigmisses + nearmisses) : 0));
printf ("# %-20s referenced\thits\n", "directory");
if (Lst_Open (openDirectories) == SUCCESS) {
- while ((ln = Lst_Next (openDirectories)) != NILLNODE) {
+ while ((ln = Lst_Next (openDirectories)) != NULL) {
p = (Path *) Lst_Datum (ln);
printf ("# %-20s %10d\t%4d\n", p->name, p->refCount, p->hits);
}
OpenPOWER on IntegriCloud