From e0ca7357cd0bfedc5c29cb731b56279fef8da059 Mon Sep 17 00:00:00 2001 From: LRN Date: Thu, 19 Dec 2013 06:00:23 +0000 Subject: malloc -> new --- src/peerinfo-tool/gnunet-peerinfo.c | 2 +- src/peerinfo-tool/gnunet-peerinfo_plugins.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src/peerinfo-tool') diff --git a/src/peerinfo-tool/gnunet-peerinfo.c b/src/peerinfo-tool/gnunet-peerinfo.c index e62df3047..f4a9d3aa6 100644 --- a/src/peerinfo-tool/gnunet-peerinfo.c +++ b/src/peerinfo-tool/gnunet-peerinfo.c @@ -364,7 +364,7 @@ print_peer_info (void *cls, const struct GNUNET_PeerIdentity *peer, GNUNET_i2s_full (peer)); return; } - pc = GNUNET_malloc (sizeof (struct PrintContext)); + pc = GNUNET_new (struct PrintContext); GNUNET_CONTAINER_DLL_insert (pc_head, pc_tail, pc); diff --git a/src/peerinfo-tool/gnunet-peerinfo_plugins.c b/src/peerinfo-tool/gnunet-peerinfo_plugins.c index 29dc4d017..37553f2f7 100644 --- a/src/peerinfo-tool/gnunet-peerinfo_plugins.c +++ b/src/peerinfo-tool/gnunet-peerinfo_plugins.c @@ -109,7 +109,7 @@ GPI_plugins_load (const struct GNUNET_CONFIGURATION_Handle *cfg) GNUNET_log (GNUNET_ERROR_TYPE_INFO, _("Loading `%s' transport plugin\n"), pos); GNUNET_asprintf (&libname, "libgnunet_plugin_transport_%s", pos); - plug = GNUNET_malloc (sizeof (struct TransportPlugin)); + plug = GNUNET_new (struct TransportPlugin); plug->short_name = GNUNET_strdup (pos); plug->lib_name = libname; plug->env.cfg = cfg; -- cgit v1.2.3