From 346c33c8b22f6e6780d0a7132982a81512172a58 Mon Sep 17 00:00:00 2001
From: Rob Landley <rob@landley.net>
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.</p></li>
 
 <li><p><b>How do I assemble a singly-linked-list in order?</b> - use
-a double_list, dlist_add() your entries, and then break the circle with
-<b>list->prev->next = NULL;</b> when done.</li>
+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).</p>
 </ul>
 
 <a name="lib_args"><h3>lib/args.c</h3>
-- 
cgit v1.2.3