diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-09-30 13:55:43 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-09-30 13:55:43 +0000 |
commit | c886c53017f31d76c22f5ed55df61719b71ef87a (patch) | |
tree | f7379a2ef9fa764d36c1f778e47cd9a87d8c51f3 /src/util/container_multihashmap32.c | |
parent | 81337e9011e6f8a9e14330946d504812f732755e (diff) | |
download | gnunet-c886c53017f31d76c22f5ed55df61719b71ef87a.tar.gz gnunet-c886c53017f31d76c22f5ed55df61719b71ef87a.zip |
-adding specialized hash table for peer identities
Diffstat (limited to 'src/util/container_multihashmap32.c')
-rw-r--r-- | src/util/container_multihashmap32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c index 8bfff0616..29ad14d3a 100644 --- a/src/util/container_multihashmap32.c +++ b/src/util/container_multihashmap32.c | |||
@@ -90,7 +90,7 @@ GNUNET_CONTAINER_multihashmap32_create (unsigned int len) | |||
90 | struct GNUNET_CONTAINER_MultiHashMap32 *ret; | 90 | struct GNUNET_CONTAINER_MultiHashMap32 *ret; |
91 | 91 | ||
92 | GNUNET_assert (len > 0); | 92 | GNUNET_assert (len > 0); |
93 | ret = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_MultiHashMap32)); | 93 | ret = GNUNET_new (struct GNUNET_CONTAINER_MultiHashMap32); |
94 | ret->map = GNUNET_malloc (len * sizeof (struct MapEntry *)); | 94 | ret->map = GNUNET_malloc (len * sizeof (struct MapEntry *)); |
95 | ret->map_length = len; | 95 | ret->map_length = len; |
96 | return ret; | 96 | return ret; |
@@ -448,7 +448,7 @@ GNUNET_CONTAINER_multihashmap32_put (struct GNUNET_CONTAINER_MultiHashMap32 | |||
448 | grow (map); | 448 | grow (map); |
449 | i = idx_of (map, key); | 449 | i = idx_of (map, key); |
450 | } | 450 | } |
451 | e = GNUNET_malloc (sizeof (struct MapEntry)); | 451 | e = GNUNET_new (struct MapEntry); |
452 | e->key = key; | 452 | e->key = key; |
453 | e->value = value; | 453 | e->value = value; |
454 | e->next = map->map[i]; | 454 | e->next = map->map[i]; |