From 86771d3b5a6ccc6c1b902a2a47958f51f97c0acd Mon Sep 17 00:00:00 2001 From: espie Date: Tue, 13 Jan 2015 18:30:15 +0000 Subject: [PATCH] zap really odd code that's not actually in-use. okay millert@ --- usr.bin/make/lst.lib/lstAppend.c | 27 ++++++++------------------- 1 file 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 -- 2.20.1