GNUnet is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
- by the Free Software Foundation; either version 2, or (at your
+ by the Free Software Foundation; either version 3, or (at your
option) any later version.
GNUnet is distributed in the hope that it will be useful, but
*/
#include "platform.h"
-#include "gnunet_common.h"
-#include "gnunet_container_lib.h"
-#include "gnunet_crypto_lib.h"
+#include "gnunet_util_lib.h"
#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
struct GNUNET_CONTAINER_MultiHashMap32 *ret;
GNUNET_assert (len > 0);
- ret = GNUNET_malloc (sizeof (struct GNUNET_CONTAINER_MultiHashMap32));
+ ret = GNUNET_new (struct GNUNET_CONTAINER_MultiHashMap32);
ret->map = GNUNET_malloc (len * sizeof (struct MapEntry *));
ret->map_length = len;
return ret;
int
GNUNET_CONTAINER_multihashmap32_contains_value (const struct
GNUNET_CONTAINER_MultiHashMap32
- *map,
+ *map,
uint32_t key,
const void *value)
{
grow (map);
i = idx_of (map, key);
}
- e = GNUNET_malloc (sizeof (struct MapEntry));
+ e = GNUNET_new (struct MapEntry);
e->key = key;
e->value = value;
e->next = map->map[i];
GNUNET_CONTAINER_multihashmap32_get_multiple (const struct
GNUNET_CONTAINER_MultiHashMap32
*map, uint32_t key,
- GNUNET_CONTAINER_HashMapIterator32
+ GNUNET_CONTAINER_HashMapIterator32
it, void *it_cls)
{
int count;