aboutsummaryrefslogtreecommitdiff
path: root/src/util/container_multihashmap.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2013-09-30 13:55:43 +0000
committerChristian Grothoff <christian@grothoff.org>2013-09-30 13:55:43 +0000
commitc886c53017f31d76c22f5ed55df61719b71ef87a (patch)
treef7379a2ef9fa764d36c1f778e47cd9a87d8c51f3 /src/util/container_multihashmap.c
parent81337e9011e6f8a9e14330946d504812f732755e (diff)
downloadgnunet-c886c53017f31d76c22f5ed55df61719b71ef87a.tar.gz
gnunet-c886c53017f31d76c22f5ed55df61719b71ef87a.zip
-adding specialized hash table for peer identities
Diffstat (limited to 'src/util/container_multihashmap.c')
-rw-r--r--src/util/container_multihashmap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index 3950684d1..5d12644cf 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -180,7 +180,7 @@ GNUNET_CONTAINER_multihashmap_create (unsigned int len,
180 struct GNUNET_CONTAINER_MultiHashMap *map; 180 struct GNUNET_CONTAINER_MultiHashMap *map;
181 181
182 GNUNET_assert (len > 0); 182 GNUNET_assert (len > 0);
183 map = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_MultiHashMap)); 183 map = GNUNET_new (struct GNUNET_CONTAINER_MultiHashMap);
184 map->map = GNUNET_malloc (len * sizeof (union MapEntry)); 184 map->map = GNUNET_malloc (len * sizeof (union MapEntry));
185 map->map_length = len; 185 map->map_length = len;
186 map->use_small_entries = do_not_copy_keys; 186 map->use_small_entries = do_not_copy_keys;
@@ -718,7 +718,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
718 { 718 {
719 struct SmallMapEntry *sme; 719 struct SmallMapEntry *sme;
720 720
721 sme = GNUNET_malloc (sizeof (struct SmallMapEntry)); 721 sme = GNUNET_new (struct SmallMapEntry);
722 sme->key = key; 722 sme->key = key;
723 sme->value = value; 723 sme->value = value;
724 sme->next = map->map[i].sme; 724 sme->next = map->map[i].sme;
@@ -728,7 +728,7 @@ GNUNET_CONTAINER_multihashmap_put (struct GNUNET_CONTAINER_MultiHashMap *map,
728 { 728 {
729 struct BigMapEntry *bme; 729 struct BigMapEntry *bme;
730 730
731 bme = GNUNET_malloc (sizeof (struct BigMapEntry)); 731 bme = GNUNET_new (struct BigMapEntry);
732 bme->key = *key; 732 bme->key = *key;
733 bme->value = value; 733 bme->value = value;
734 bme->next = map->map[i].bme; 734 bme->next = map->map[i].bme;