summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstAppend.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/lst.lib/lstAppend.c')
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c16
1 files changed, 1 insertions, 15 deletions
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c
index b5c201d..297926c 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -54,9 +54,6 @@ __FBSDID("$FreeBSD$");
* Lst_Append --
* Create a new node and add it to the given list after the given node.
*
- * Results:
- * SUCCESS if all went well.
- *
* Arguments:
* l affected list
* ln node after which to append the datum
@@ -70,20 +67,11 @@ __FBSDID("$FreeBSD$");
*
*-----------------------------------------------------------------------
*/
-ReturnStatus
+void
Lst_Append(Lst *list, LstNode *ln, void *d)
{
LstNode *nLNode;
- if (Lst_Valid(list) && (ln == NULL && Lst_IsEmpty(list))) {
- goto ok;
- }
-
- if (!Lst_Valid(list) || Lst_IsEmpty(list) || ! Lst_NodeValid(ln, list)) {
- return (FAILURE);
- }
- ok:
-
nLNode = emalloc(sizeof(*nLNode));
nLNode->datum = d;
nLNode->useCount = nLNode->flags = 0;
@@ -104,6 +92,4 @@ Lst_Append(Lst *list, LstNode *ln, void *d)
list->lastPtr = nLNode;
}
}
-
- return (SUCCESS);
}
OpenPOWER on IntegriCloud