documented corner case of dll remove
authorFlorian Dold <florian.dold@gmail.com>
Tue, 25 Jun 2013 20:51:44 +0000 (20:51 +0000)
committerFlorian Dold <florian.dold@gmail.com>
Tue, 25 Jun 2013 20:51:44 +0000 (20:51 +0000)
src/include/gnunet_container_lib.h

index 1eb55a4c5c903a24de20120b6a01b621dd00a3e5..c9cfa23d243fe8f878d0079611c297e90bf2ceb6 100644 (file)
@@ -999,9 +999,13 @@ GNUNET_CONTAINER_multihashmap32_get_multiple (const struct
 
 
 /**
- * Remove an element from a DLL. Assumes
- * that head, tail and element are structs
- * with prev and next fields.
+ * Remove an element from a DLL. Assumes that head, tail and
+ * element point to structs with prev and next fields.
+ *
+ * Using the head or tail pointer as the element
+ * argument does NOT work with this macro.
+ * Make sure to store head/tail in another pointer
+ * and use it to remove the head or tail of the list.
  *
  * @param head pointer to the head of the DLL
  * @param tail pointer to the tail of the DLL