diff options
author | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
---|---|---|
committer | LRN <lrn1986@gmail.com> | 2013-12-19 06:00:23 +0000 |
commit | e0ca7357cd0bfedc5c29cb731b56279fef8da059 (patch) | |
tree | ecfd47cf59bc00e656b53fd59c58f5038e342d65 /src/peerinfo | |
parent | 92fd84dc7ef98452f848a62677c61a2b80b5835e (diff) | |
download | gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip |
malloc -> new
Diffstat (limited to 'src/peerinfo')
-rw-r--r-- | src/peerinfo/gnunet-service-peerinfo.c | 2 | ||||
-rw-r--r-- | src/peerinfo/peerinfo_api.c | 4 | ||||
-rw-r--r-- | src/peerinfo/peerinfo_api_notify.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/peerinfo/gnunet-service-peerinfo.c b/src/peerinfo/gnunet-service-peerinfo.c index a78855101..60ecaeb41 100644 --- a/src/peerinfo/gnunet-service-peerinfo.c +++ b/src/peerinfo/gnunet-service-peerinfo.c | |||
@@ -1138,7 +1138,7 @@ handle_notify (void *cls, struct GNUNET_SERVER_Client *client, | |||
1138 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 1138 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
1139 | "`%s' message received\n", | 1139 | "`%s' message received\n", |
1140 | "NOTIFY"); | 1140 | "NOTIFY"); |
1141 | nc = GNUNET_malloc (sizeof (struct NotificationContext)); | 1141 | nc = GNUNET_new (struct NotificationContext); |
1142 | nc->client = client; | 1142 | nc->client = client; |
1143 | nc->include_friend_only = ntohl (nm->include_friend_only); | 1143 | nc->include_friend_only = ntohl (nm->include_friend_only); |
1144 | 1144 | ||
diff --git a/src/peerinfo/peerinfo_api.c b/src/peerinfo/peerinfo_api.c index 794060487..716802389 100644 --- a/src/peerinfo/peerinfo_api.c +++ b/src/peerinfo/peerinfo_api.c | |||
@@ -201,7 +201,7 @@ GNUNET_PEERINFO_connect (const struct GNUNET_CONFIGURATION_Handle *cfg) | |||
201 | { | 201 | { |
202 | struct GNUNET_PEERINFO_Handle *h; | 202 | struct GNUNET_PEERINFO_Handle *h; |
203 | 203 | ||
204 | h = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_Handle)); | 204 | h = GNUNET_new (struct GNUNET_PEERINFO_Handle); |
205 | h->client = GNUNET_CLIENT_connect ("peerinfo", cfg); | 205 | h->client = GNUNET_CLIENT_connect ("peerinfo", cfg); |
206 | h->cfg = cfg; | 206 | h->cfg = cfg; |
207 | return h; | 207 | return h; |
@@ -708,7 +708,7 @@ GNUNET_PEERINFO_iterate (struct GNUNET_PEERINFO_Handle *h, | |||
708 | struct GNUNET_PEERINFO_IteratorContext *ic; | 708 | struct GNUNET_PEERINFO_IteratorContext *ic; |
709 | struct GNUNET_PEERINFO_AddContext *ac; | 709 | struct GNUNET_PEERINFO_AddContext *ac; |
710 | 710 | ||
711 | ic = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_IteratorContext)); | 711 | ic = GNUNET_new (struct GNUNET_PEERINFO_IteratorContext); |
712 | if (NULL == peer) | 712 | if (NULL == peer) |
713 | { | 713 | { |
714 | LOG (GNUNET_ERROR_TYPE_DEBUG, | 714 | LOG (GNUNET_ERROR_TYPE_DEBUG, |
diff --git a/src/peerinfo/peerinfo_api_notify.c b/src/peerinfo/peerinfo_api_notify.c index f5a076a20..af41b08f9 100644 --- a/src/peerinfo/peerinfo_api_notify.c +++ b/src/peerinfo/peerinfo_api_notify.c | |||
@@ -269,7 +269,7 @@ GNUNET_PEERINFO_notify (const struct GNUNET_CONFIGURATION_Handle *cfg, | |||
269 | "peerinfo"); | 269 | "peerinfo"); |
270 | return NULL; | 270 | return NULL; |
271 | } | 271 | } |
272 | nc = GNUNET_malloc (sizeof (struct GNUNET_PEERINFO_NotifyContext)); | 272 | nc = GNUNET_new (struct GNUNET_PEERINFO_NotifyContext); |
273 | nc->cfg = cfg; | 273 | nc->cfg = cfg; |
274 | nc->client = client; | 274 | nc->client = client; |
275 | nc->callback = callback; | 275 | nc->callback = callback; |