undo
authorChristian Grothoff <christian@grothoff.org>
Sat, 3 Oct 2009 19:34:14 +0000 (19:34 +0000)
committerChristian Grothoff <christian@grothoff.org>
Sat, 3 Oct 2009 19:34:14 +0000 (19:34 +0000)
src/util/container_slist.c

index 192429e6c23aeae520ac2c5121a2fa15e32895bf..1a03fdca397f589cecff9d438deb7d07b1bd0a7b 100644 (file)
@@ -92,6 +92,7 @@ struct GNUNET_CONTAINER_SList_Iterator
   struct GNUNET_CONTAINER_SList_Elem *elem;
 };
 
+
 /**
  * Create a new element that is to be inserted into the list
  * @internal
@@ -112,14 +113,13 @@ create_elem (enum GNUNET_CONTAINER_SListDisposition disp,
       e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem) + len);
       memcpy (&e[1], buf, len);
       e->elem = (void*) &e[1];
-      e->disp = GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC;
     }
   else
     {
       e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem));
       e->elem = (void*) buf;
-      e->disp = disp;
     }
+  e->disp = disp;
   e->len = len;
   return e;
 }