aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_slist.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2009-10-03 19:34:14 +0000
committerChristian Grothoff <christian@grothoff.org>2009-10-03 19:34:14 +0000
commit060ff72fd45dc418e9273bff7b4c7e65eedc5308 (patch)
tree342039183be05c0fefde93752da4d635185b486e /src/util/container_slist.c
parent788d75d26a4f3a50b82f00293e691e1095e22be9 (diff)
downloadgnunet-060ff72fd45dc418e9273bff7b4c7e65eedc5308.tar.gz
gnunet-060ff72fd45dc418e9273bff7b4c7e65eedc5308.zip
undo
Diffstat (limited to 'src/util/container_slist.c')
-rw-r--r--src/util/container_slist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/container_slist.c b/src/util/container_slist.c
index 192429e6c..1a03fdca3 100644
--- a/src/util/container_slist.c
+++ b/src/util/container_slist.c
@@ -92,6 +92,7 @@ struct GNUNET_CONTAINER_SList_Iterator
92 struct GNUNET_CONTAINER_SList_Elem *elem; 92 struct GNUNET_CONTAINER_SList_Elem *elem;
93}; 93};
94 94
95
95/** 96/**
96 * Create a new element that is to be inserted into the list 97 * Create a new element that is to be inserted into the list
97 * @internal 98 * @internal
@@ -112,14 +113,13 @@ create_elem (enum GNUNET_CONTAINER_SListDisposition disp,
112 e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem) + len); 113 e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem) + len);
113 memcpy (&e[1], buf, len); 114 memcpy (&e[1], buf, len);
114 e->elem = (void*) &e[1]; 115 e->elem = (void*) &e[1];
115 e->disp = GNUNET_CONTAINER_SLIST_DISPOSITION_DYNAMIC;
116 } 116 }
117 else 117 else
118 { 118 {
119 e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem)); 119 e = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_SList_Elem));
120 e->elem = (void*) buf; 120 e->elem = (void*) buf;
121 e->disp = disp;
122 } 121 }
122 e->disp = disp;
123 e->len = len; 123 e->len = len;
124 return e; 124 return e;
125} 125}