summaryrefslogtreecommitdiff
path: root/usr.bin/make/lst.lib/lstDestroy.c
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>1999-12-18 21:53:35 +0000
committerMarc Espie <espie@cvs.openbsd.org>1999-12-18 21:53:35 +0000
commit55cf72374a6a0695c5f50929233d06baccf648f7 (patch)
treeed27b73215fc2d04eb4940923b41124839f62167 /usr.bin/make/lst.lib/lstDestroy.c
parente4bc6799b57e2d16e3a510719ddd8e746dda9879 (diff)
NIL, NILGNODE, etc, are only glorified NULL.
Get rid of them. Get rid of list.h, nothing uses it anyway.
Diffstat (limited to 'usr.bin/make/lst.lib/lstDestroy.c')
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index 0b63720645c..4625656e3c3 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstDestroy.c,v 1.4 1998/12/05 00:06:31 espie Exp $ */
+/* $OpenBSD: lstDestroy.c,v 1.5 1999/12/18 21:53:33 espie Exp $ */
/* $NetBSD: lstDestroy.c,v 1.6 1996/11/06 17:59:37 christos Exp $ */
/*
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)lstDestroy.c 8.1 (Berkeley) 6/6/93";
#else
-static char rcsid[] = "$OpenBSD: lstDestroy.c,v 1.4 1998/12/05 00:06:31 espie Exp $";
+static char rcsid[] = "$OpenBSD: lstDestroy.c,v 1.5 1999/12/18 21:53:33 espie Exp $";
#endif
#endif /* not lint */
@@ -73,10 +73,10 @@ Lst_Destroy (l, freeProc)
register void (*freeProc) __P((ClientData));
{
register ListNode ln;
- register ListNode tln = NilListNode;
+ register ListNode tln = NULL;
register List list = (List)l;
- if (l == NILLST || ! l) {
+ if (l == NULL) {
/*
* Note the check for l == (Lst)0 to catch uninitialized static Lst's.
* Gross, but useful.
@@ -85,21 +85,21 @@ Lst_Destroy (l, freeProc)
}
/* To ease scanning */
- if (list->lastPtr != NilListNode)
- list->lastPtr->nextPtr = NilListNode;
+ if (list->lastPtr != NULL)
+ list->lastPtr->nextPtr = NULL;
else {
free ((Address)l);
return;
}
if (freeProc) {
- for (ln = list->firstPtr; ln != NilListNode; ln = tln) {
+ for (ln = list->firstPtr; ln != NULL; ln = tln) {
tln = ln->nextPtr;
(*freeProc) (ln->datum);
free ((Address)ln);
}
} else {
- for (ln = list->firstPtr; ln != NilListNode; ln = tln) {
+ for (ln = list->firstPtr; ln != NULL; ln = tln) {
tln = ln->nextPtr;
free ((Address)ln);
}