util: fix comment and clarify argument name in DLIST_DEMOTE()
[ira/wip.git] / lib / util / dlinklist.h
index 1a4ebb6fa090c7c3eb652ef9e26e87f5691fdc56..693b43dd27e083152b9c6d189c115930872badd0 100644 (file)
@@ -87,11 +87,11 @@ do { \
        }\
 } while (0)
 
-/* demote an element to the end of the list, needs a tmp pointer */
-#define DLIST_DEMOTE(list, p, tmp) \
+/* demote an element to the end of the list, needs the entry type */
+#define DLIST_DEMOTE(list, p, type) \
 do { \
                DLIST_REMOVE(list, p); \
-               DLIST_ADD_END(list, p, tmp); \
+               DLIST_ADD_END(list, p, type); \
 } while (0)
 
 /* concatenate two lists - putting all elements of the 2nd list at the