/**
* Looks up in the cache and returns the entry
*
- * @param key the peer identity of the peer whose corresponding entry has to be
- * looked up
+ * @param peer_id the peer identity of the peer whose corresponding entry has to
+ * be looked up
* @return the HELLO message; NULL if not found
*/
static struct CacheEntry *
add_entry (unsigned int peer_id)
{
struct CacheEntry *entry;
-
+
GNUNET_assert (NULL != cache);
if (cache_size == GNUNET_CONTAINER_multihashmap32_size (cache))
{
entry->peer_id,
entry));
}
- entry = GNUNET_malloc (sizeof (struct CacheEntry));
+ entry = GNUNET_new (struct CacheEntry);
entry->peer_id = peer_id;
GNUNET_assert (GNUNET_OK ==
GNUNET_CONTAINER_multihashmap32_put (cache,