summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstDestroy.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/lst.lib/lstDestroy.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/lst.lib/lstDestroy.c')
-rw-r--r--usr.bin/make/lst.lib/lstDestroy.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/usr.bin/make/lst.lib/lstDestroy.c b/usr.bin/make/lst.lib/lstDestroy.c
index e6db457..32f79f4 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -69,10 +69,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 || ! l) {
/*
* Note the check for l == (Lst)0 to catch uninitialized static Lst's.
* Gross, but useful.
@@ -81,21 +81,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);
}
OpenPOWER on IntegriCloud