- fixes
[oweals/gnunet.git] / src / testbed / gnunet-service-testbed_cache.c
index 69f820a30cf6d99a5a75ff5555da08c8e267577e..070aeefa567c2b2751b1e8a794a4536bd46578e9 100644 (file)
@@ -92,8 +92,8 @@ static unsigned int cache_size;
 /**
  * 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 *
@@ -121,7 +121,7 @@ static struct CacheEntry *
 add_entry (unsigned int peer_id)
 {
   struct CacheEntry *entry;
-  
+
   GNUNET_assert (NULL != cache);
   if (cache_size == GNUNET_CONTAINER_multihashmap32_size (cache))
   {
@@ -132,7 +132,7 @@ add_entry (unsigned int peer_id)
                                                            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,