summaryrefslogtreecommitdiff
path: root/src/transport/transport-testing.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/transport-testing.c
parent92fd84dc7ef98452f848a62677c61a2b80b5835e (diff)
malloc -> new
Diffstat (limited to 'src/transport/transport-testing.c')
-rw-r--r--src/transport/transport-testing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/transport-testing.c b/src/transport/transport-testing.c
index 51aa0a55f..f9182b57f 100644
--- a/src/transport/transport-testing.c
+++ b/src/transport/transport-testing.c
@@ -246,7 +246,7 @@ GNUNET_TRANSPORT_TESTING_start_peer (struct GNUNET_TRANSPORT_TESTING_handle *tth
return NULL;
}
- struct PeerContext *p = GNUNET_malloc (sizeof (struct PeerContext));
+ struct PeerContext *p = GNUNET_new (struct PeerContext);
GNUNET_CONTAINER_DLL_insert (tth->p_head, tth->p_tail, p);
/* Create configuration and call testing lib to modify it */
@@ -471,7 +471,7 @@ GNUNET_TRANSPORT_TESTING_connect_peers (struct GNUNET_TRANSPORT_TESTING_handle *
GNUNET_assert (tth != NULL);
struct ConnectingContext *cc =
- GNUNET_malloc (sizeof (struct ConnectingContext));
+ GNUNET_new (struct ConnectingContext);
GNUNET_assert (p1 != NULL);
GNUNET_assert (p2 != NULL);
@@ -574,7 +574,7 @@ GNUNET_TRANSPORT_TESTING_init ()
struct GNUNET_TRANSPORT_TESTING_handle *tth;
/* prepare hostkeys */
- tth = GNUNET_malloc (sizeof (struct GNUNET_TRANSPORT_TESTING_handle));
+ tth = GNUNET_new (struct GNUNET_TRANSPORT_TESTING_handle);
/* Init testing the testing lib */
tth->tl_system = GNUNET_TESTING_system_create ("transport-testing", NULL,