From 298adbb1d8ac5355e925c69fae5706518c18d8e9 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 25 Jun 2013 20:51:44 +0000 Subject: documented corner case of dll remove --- src/include/gnunet_container_lib.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/include/gnunet_container_lib.h') diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h index 1eb55a4c5..c9cfa23d2 100644 --- a/src/include/gnunet_container_lib.h +++ b/src/include/gnunet_container_lib.h @@ -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 -- cgit v1.2.3