summaryrefslogtreecommitdiffstats
path: root/usr.bin/make/lst.lib/lstNext.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/lst.lib/lstNext.c')
-rw-r--r--usr.bin/make/lst.lib/lstNext.c18
1 files changed, 5 insertions, 13 deletions
diff --git a/usr.bin/make/lst.lib/lstNext.c b/usr.bin/make/lst.lib/lstNext.c
index 5d388af..f51d674 100644
--- a/usr.bin/make/lst.lib/lstNext.c
+++ b/usr.bin/make/lst.lib/lstNext.c
@@ -46,9 +46,8 @@ __FBSDID("$FreeBSD$");
* Return the next node for a list.
* The sequential functions access the list in a slightly different way.
* CurPtr points to their idea of the current node in the list and they
- * access the list based on it. Because the list is circular, Lst_Next
- * and Lst_Prev will go around the list forever. Lst_IsAtEnd must be
- * used to determine when to stop.
+ * access the list based on it. Lst_IsAtEnd must be used to determine
+ * when to stop.
*/
#include "make.h"
@@ -60,9 +59,8 @@ __FBSDID("$FreeBSD$");
* Return the next node for the given list.
*
* Results:
- * The next node or NULL if the list has yet to be opened. Also
- * if the list is non-circular and the end has been reached, NULL
- * is returned.
+ * The next node or NULL if the list has yet to be opened or the end
+ * has been reached.
*
* Side Effects:
* the curPtr field is updated.
@@ -97,15 +95,9 @@ Lst_Next(Lst list)
tln = list->curPtr->nextPtr;
list->curPtr = tln;
- if (tln == list->firstPtr || tln == NULL) {
- /*
- * If back at the front, then we've hit the end...
- */
+ if (tln == NULL) {
list->atEnd = LstTail;
} else {
- /*
- * Reset to Middle if gone past first.
- */
list->atEnd = LstMiddle;
}
}
OpenPOWER on IntegriCloud