summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstDestroy.c
diff options
context:
space:
mode:
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 4e511d2..8942ddf 100644
--- a/usr.bin/make/lst.lib/lstDestroy.c
+++ b/usr.bin/make/lst.lib/lstDestroy.c
@@ -46,7 +46,8 @@ __FBSDID("$FreeBSD$");
* Nuke a list and all its resources
*/
-#include "lstInt.h"
+#include "make.h"
+#include "lst.h"
/*-
*-----------------------------------------------------------------------
@@ -64,13 +65,12 @@ __FBSDID("$FreeBSD$");
*-----------------------------------------------------------------------
*/
void
-Lst_Destroy(Lst l, void (*freeProc)(void *))
+Lst_Destroy(Lst list, void (*freeProc)(void *))
{
- ListNode ln;
- ListNode tln = NULL;
- List list = (List)l;
+ LstNode ln;
+ LstNode tln = NULL;
- if (l == NULL || ! l) {
+ if (list == NULL || ! list) {
/*
* Note the check for l == (Lst)0 to catch uninitialized static Lst's.
* Gross, but useful.
@@ -82,7 +82,7 @@ Lst_Destroy(Lst l, void (*freeProc)(void *))
if (list->lastPtr != NULL)
list->lastPtr->nextPtr = NULL;
else {
- free (l);
+ free (list);
return;
}
@@ -99,5 +99,5 @@ Lst_Destroy(Lst l, void (*freeProc)(void *))
}
}
- free (l);
+ free (list);
}
OpenPOWER on IntegriCloud