projects
/
oweals
/
gnunet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- fix doc
[oweals/gnunet.git]
/
src
/
testbed
/
testbed_api_sd.c
diff --git
a/src/testbed/testbed_api_sd.c
b/src/testbed/testbed_api_sd.c
index 62f358de98c3aac23355937a1652f8875598d4e8..08f697248e797b46dfa020bb57a1e434e434178c 100644
(file)
--- a/
src/testbed/testbed_api_sd.c
+++ b/
src/testbed/testbed_api_sd.c
@@
-21,7
+21,7
@@
/**
* @file testbed/testbed_api_sd.c
* @brief functions to calculate standard deviation
/**
* @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"
*/
#include "platform.h"
@@
-109,7
+109,7
@@
GNUNET_TESTBED_SD_init_ (unsigned int max_cnt)
struct SDHandle *h;
GNUNET_assert (1 < max_cnt);
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;
}
h->max_cnt = max_cnt;
return h;
}
@@
-159,7
+159,7
@@
GNUNET_TESTBED_SD_add_data_ (struct SDHandle *h, unsigned int amount)
}
GNUNET_assert (h->cnt < h->max_cnt);
if (NULL == entry)
}
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;
entry->amount = amount;
GNUNET_CONTAINER_DLL_insert_tail (h->head, h->tail, entry);
h->sum += amount;