/**
* @file testbed/testbed_api_sd.c
* @brief functions to calculate standard deviation
- * @author Sree Harsha Totakura <sreeharsha@totakura.in>
+ * @author Sree Harsha Totakura <sreeharsha@totakura.in>
*/
#include "platform.h"
struct SDHandle *h;
GNUNET_assert (1 < max_cnt);
- h = GNUNET_malloc (sizeof (struct SDHandle));
+ h = GNUNET_new (struct SDHandle);
h->max_cnt = max_cnt;
return h;
}
}
GNUNET_assert (h->cnt < h->max_cnt);
if (NULL == entry)
- entry = GNUNET_malloc (sizeof (struct SDEntry));
+ entry = GNUNET_new (struct SDEntry);
entry->amount = amount;
GNUNET_CONTAINER_DLL_insert_tail (h->head, h->tail, entry);
h->sum += amount;