From 346c33c8b22f6e6780d0a7132982a81512172a58 Mon Sep 17 00:00:00 2001
From: Rob Landley
Date: Tue, 4 Oct 2016 15:08:48 -0500
Subject: Explain dlist_terminate.
---
www/code.html | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
(limited to 'www')
diff --git a/www/code.html b/www/code.html
index 77b0b211..bee139fa 100644
--- a/www/code.html
+++ b/www/code.html
@@ -861,8 +861,9 @@ won't warn you if you forget the &, but the code crashes pretty quickly in
that case.
How do I assemble a singly-linked-list in order? - use
-a double_list, dlist_add() your entries, and then break the circle with
-list->prev->next = NULL; when done.
+a double_list, dlist_add() your entries, and then call dlist_terminate(list)
+to break the circle when done (turning the last ->next and the first ->prev
+into NULLs).
lib/args.c
--
cgit v1.2.3