summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2021-03-04 09:45:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2021-03-04 09:45:32 +0000
commit070df75ec595a3ac32b78ac345b8afa8d6b4f0d0 (patch)
tree375ff8c56ccbbd56197e6a84e3764940a350b57e /usr.bin
parent519c693136ea36d7ccfdc1416f57d4ff7d5a911a (diff)
warn about proper usage of Lst_Destroy.
as noticed by jsg@
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/lst.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/usr.bin/make/lst.h b/usr.bin/make/lst.h
index b7a02d7b318..c3a745069e1 100644
--- a/usr.bin/make/lst.h
+++ b/usr.bin/make/lst.h
@@ -1,7 +1,7 @@
#ifndef _LST_H_
#define _LST_H_
-/* $OpenBSD: lst.h,v 1.32 2020/06/03 12:47:33 espie Exp $ */
+/* $OpenBSD: lst.h,v 1.33 2021/03/04 09:45:31 espie Exp $ */
/* $NetBSD: lst.h,v 1.7 1996/11/06 17:59:12 christos Exp $ */
/*
@@ -82,6 +82,11 @@ typedef void *(*DuplicateProc)(void *);
/* Duplicate an existing list */
extern Lst Lst_Clone(Lst, Lst, DuplicateProc);
+
+/* XXX: Lst_Destroy only destroys the list contents, which is appropriate
+ * as most use-cases are temporary lists.
+ * In case of a permanent list, Lst_Init must also be called !
+ */
/* Destroy an old one */
extern void Lst_Destroy(LIST *, SimpleProc);
/* True if list is empty */