aboutsummaryrefslogtreecommitdiff
path: root/src/transport/gnunet-service-transport_manipulation.c
diff options
context:
space:
mode:
authorLRN <lrn1986@gmail.com>2013-12-19 06:00:23 +0000
committerLRN <lrn1986@gmail.com>2013-12-19 06:00:23 +0000
commite0ca7357cd0bfedc5c29cb731b56279fef8da059 (patch)
treeecfd47cf59bc00e656b53fd59c58f5038e342d65 /src/transport/gnunet-service-transport_manipulation.c
parent92fd84dc7ef98452f848a62677c61a2b80b5835e (diff)
downloadgnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz
gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip
malloc -> new
Diffstat (limited to 'src/transport/gnunet-service-transport_manipulation.c')
-rw-r--r--src/transport/gnunet-service-transport_manipulation.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/transport/gnunet-service-transport_manipulation.c b/src/transport/gnunet-service-transport_manipulation.c
index 1b708cb70..da3fc2de9 100644
--- a/src/transport/gnunet-service-transport_manipulation.c
+++ b/src/transport/gnunet-service-transport_manipulation.c
@@ -210,7 +210,7 @@ set_metric (struct TM_Peer *dest, int direction, uint32_t type, uint32_t value)
210 } 210 }
211 if (NULL == cur) 211 if (NULL == cur)
212 { 212 {
213 cur = GNUNET_malloc (sizeof (struct PropManipulationEntry)); 213 cur = GNUNET_new (struct PropManipulationEntry);
214 GNUNET_CONTAINER_DLL_insert (dest->head, dest->tail, cur); 214 GNUNET_CONTAINER_DLL_insert (dest->head, dest->tail, cur);
215 cur->type = type; 215 cur->type = type;
216 cur->metrics[TM_SEND] = UINT32_MAX; 216 cur->metrics[TM_SEND] = UINT32_MAX;
@@ -327,7 +327,7 @@ GST_manipulation_set_metric (void *cls, struct GNUNET_SERVER_Client *client,
327 327
328 if (NULL == (tmp = GNUNET_CONTAINER_multipeermap_get (man_handle.peers, &tm->peer))) 328 if (NULL == (tmp = GNUNET_CONTAINER_multipeermap_get (man_handle.peers, &tm->peer)))
329 { 329 {
330 tmp = GNUNET_malloc (sizeof (struct TM_Peer)); 330 tmp = GNUNET_new (struct TM_Peer);
331 tmp->peer = (tm->peer); 331 tmp->peer = (tm->peer);
332 for (c = 0; c < TM_BOTH; c++) 332 for (c = 0; c < TM_BOTH; c++)
333 { 333 {