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/transport/plugin_transport_udp.c | |
parent | 92fd84dc7ef98452f848a62677c61a2b80b5835e (diff) | |
download | gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.tar.gz gnunet-e0ca7357cd0bfedc5c29cb731b56279fef8da059.zip |
malloc -> new
Diffstat (limited to 'src/transport/plugin_transport_udp.c')
-rw-r--r-- | src/transport/plugin_transport_udp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index 5b46c93c7..a5ee6494a 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c | |||
@@ -684,7 +684,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen, | |||
684 | { | 684 | { |
685 | struct IPv4UdpAddress *u4; | 685 | struct IPv4UdpAddress *u4; |
686 | struct sockaddr_in *in4 = (struct sockaddr_in *) &socket_address; | 686 | struct sockaddr_in *in4 = (struct sockaddr_in *) &socket_address; |
687 | u4 = GNUNET_malloc (sizeof (struct IPv4UdpAddress)); | 687 | u4 = GNUNET_new (struct IPv4UdpAddress); |
688 | u4->options = htonl (options); | 688 | u4->options = htonl (options); |
689 | u4->ipv4_addr = in4->sin_addr.s_addr; | 689 | u4->ipv4_addr = in4->sin_addr.s_addr; |
690 | u4->u4_port = in4->sin_port; | 690 | u4->u4_port = in4->sin_port; |
@@ -696,7 +696,7 @@ udp_string_to_address (void *cls, const char *addr, uint16_t addrlen, | |||
696 | { | 696 | { |
697 | struct IPv6UdpAddress *u6; | 697 | struct IPv6UdpAddress *u6; |
698 | struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address; | 698 | struct sockaddr_in6 *in6 = (struct sockaddr_in6 *) &socket_address; |
699 | u6 = GNUNET_malloc (sizeof (struct IPv6UdpAddress)); | 699 | u6 = GNUNET_new (struct IPv6UdpAddress); |
700 | u6->options = htonl (options); | 700 | u6->options = htonl (options); |
701 | u6->ipv6_addr = in6->sin6_addr; | 701 | u6->ipv6_addr = in6->sin6_addr; |
702 | u6->u6_port = in6->sin6_port; | 702 | u6->u6_port = in6->sin6_port; |
@@ -1911,7 +1911,7 @@ udp_plugin_send (void *cls, | |||
1911 | if (s->frag_ctx != NULL) | 1911 | if (s->frag_ctx != NULL) |
1912 | return GNUNET_SYSERR; | 1912 | return GNUNET_SYSERR; |
1913 | memcpy (&udp[1], msgbuf, msgbuf_size); | 1913 | memcpy (&udp[1], msgbuf, msgbuf_size); |
1914 | frag_ctx = GNUNET_malloc (sizeof (struct UDP_FragmentationContext)); | 1914 | frag_ctx = GNUNET_new (struct UDP_FragmentationContext); |
1915 | frag_ctx->plugin = plugin; | 1915 | frag_ctx->plugin = plugin; |
1916 | frag_ctx->session = s; | 1916 | frag_ctx->session = s; |
1917 | frag_ctx->cont = cont; | 1917 | frag_ctx->cont = cont; |