* nih/list.h (NIH_LIST_FOREACH_SAFE): Fix a typo that caused only
once cursor variable to be used, rather than one per iteration.
diff --git a/ChangeLog b/ChangeLog
index 39c2625..4d56183 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2008-10-24  Scott James Remnant  <scott@netsplit.com>
 
+	* nih/list.h (NIH_LIST_FOREACH_SAFE): Fix a typo that caused only
+	once cursor variable to be used, rather than one per iteration.
+
 	* nih/main.h, nih/main.c, nih/dbus.c, nih/tests/test_dbus.c: Revert
 	previous "delete" patch now that we can iterate linked lists
 	without tripping over the bug we found here.
diff --git a/nih/list.h b/nih/list.h
index 251ce8b..57a2fa4 100644
--- a/nih/list.h
+++ b/nih/list.h
@@ -106,7 +106,7 @@
  * would be placed before the cursor and thus skipped.
  **/
 #define NIH_LIST_FOREACH_SAFE(list, iter)				\
-	for (NihList  _##iter##_cursor = { &_##iter_cursor, &_##iter_cursor }, \
+	for (NihList  _##iter##_cursor = { &_##iter##_cursor, &_##iter##_cursor }, \
 		     *_##iter = &_##iter##_cursor;			\
 	     _##iter;							\
 	     nih_list_destroy (_##iter), _##iter = NULL)		\