summaryrefslogtreecommitdiff
path: root/usr.bin/make/lst.lib
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2015-01-13 18:30:16 +0000
committerMarc Espie <espie@cvs.openbsd.org>2015-01-13 18:30:16 +0000
commitde1492a17c258830a6a6e290f6b8232450d4311b (patch)
tree76e31d177ebbff3f346acf394fc3ff45e3db16ae /usr.bin/make/lst.lib
parent9d896a42874dd6ba2a48724b4915123f334dac75 (diff)
zap really odd code that's not actually in-use.
okay millert@
Diffstat (limited to 'usr.bin/make/lst.lib')
-rw-r--r--usr.bin/make/lst.lib/lstAppend.c27
1 files changed, 8 insertions, 19 deletions
diff --git a/usr.bin/make/lst.lib/lstAppend.c b/usr.bin/make/lst.lib/lstAppend.c
index 5734b9fd5c5..cde7c0a1316 100644
--- a/usr.bin/make/lst.lib/lstAppend.c
+++ b/usr.bin/make/lst.lib/lstAppend.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: lstAppend.c,v 1.20 2010/07/19 19:46:44 espie Exp $ */
+/* $OpenBSD: lstAppend.c,v 1.21 2015/01/13 18:30:15 espie Exp $ */
/* $NetBSD: lstAppend.c,v 1.5 1996/11/06 17:59:31 christos Exp $ */
/*
@@ -61,29 +61,18 @@ Lst_Append(Lst l, LstNode after, void *d)
{
LstNode nLNode;
- if (after == NULL && !Lst_IsEmpty(l))
- return;
-
- if (after != NULL && Lst_IsEmpty(l))
- return;
-
PAlloc(nLNode, LstNode);
nLNode->datum = d;
- if (after == NULL) {
- nLNode->nextPtr = nLNode->prevPtr = NULL;
- l->firstPtr = l->lastPtr = nLNode;
- } else {
- nLNode->prevPtr = after;
- nLNode->nextPtr = after->nextPtr;
+ nLNode->prevPtr = after;
+ nLNode->nextPtr = after->nextPtr;
- after->nextPtr = nLNode;
- if (nLNode->nextPtr != NULL)
- nLNode->nextPtr->prevPtr = nLNode;
+ after->nextPtr = nLNode;
+ if (nLNode->nextPtr != NULL)
+ nLNode->nextPtr->prevPtr = nLNode;
- if (after == l->lastPtr)
- l->lastPtr = nLNode;
- }
+ if (after == l->lastPtr)
+ l->lastPtr = nLNode;
}
void