From 5de4d2e77f907cb3d2d734fe1d7eafa943b1d001 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 18 Jun 2010 16:12:04 +0000 Subject: [PATCH] cleaning --- src/transport/plugin_transport_http.c | 2 -- src/transport/plugin_transport_udp.c | 1 - src/util/disk.c | 5 ----- src/util/network.c | 3 --- 4 files changed, 11 deletions(-) diff --git a/src/transport/plugin_transport_http.c b/src/transport/plugin_transport_http.c index 0e8a8cd7e..0106afcce 100644 --- a/src/transport/plugin_transport_http.c +++ b/src/transport/plugin_transport_http.c @@ -365,7 +365,6 @@ static struct Session * create_session (struct sockaddr_in *addr_in, struct sock ses->addr_inbound = GNUNET_malloc ( sizeof (struct sockaddr_in) ); ses->addr_outbound = GNUNET_malloc ( sizeof (struct sockaddr_in) ); - ses->next = NULL; ses->plugin = plugin; if ((NULL != addr_in) && (( AF_INET == addr_in->sin_family) || ( AF_INET6 == addr_in->sin_family))) { @@ -852,7 +851,6 @@ static size_t send_read_callback(void *stream, size_t size, size_t nmemb, void * struct HTTP_Message * msg = ses->pending_outbound_msg; unsigned int bytes_sent; unsigned int len; - bytes_sent = 0; /* data to send */ if (( msg->pos < msg->len)) diff --git a/src/transport/plugin_transport_udp.c b/src/transport/plugin_transport_udp.c index e79daa351..434fd9ba1 100644 --- a/src/transport/plugin_transport_udp.c +++ b/src/transport/plugin_transport_udp.c @@ -682,7 +682,6 @@ udp_plugin_send (void *cls, peer_session->messages->msgbuf = GNUNET_malloc(msgbuf_size); memcpy(peer_session->messages->msgbuf, msgbuf, msgbuf_size); peer_session->messages->msgbuf_size = msgbuf_size; - peer_session->messages->next = NULL; peer_session->messages->timeout = GNUNET_TIME_relative_to_absolute(timeout); peer_session->messages->cont = cont; peer_session->messages->cont_cls = cont_cls; diff --git a/src/util/disk.c b/src/util/disk.c index 94615f198..6cac1f70c 100644 --- a/src/util/disk.c +++ b/src/util/disk.c @@ -1532,7 +1532,6 @@ GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, return ret; #else int prot; - int ec; prot = 0; if (access & GNUNET_DISK_MAP_TYPE_READ) @@ -1544,9 +1543,7 @@ GNUNET_DISK_file_map (const struct GNUNET_DISK_FileHandle *h, GNUNET_assert (NULL != (*m)->addr); if (MAP_FAILED == (*m)->addr) { - ec = errno; GNUNET_free (*m); - errno = ec; return NULL; } (*m)->len = len; @@ -1641,9 +1638,7 @@ GNUNET_DISK_pipe (int blocking) ret = pipe (fd); if (ret == -1) { - eno = errno; GNUNET_free (p); - errno = eno; return NULL; } p->fd[0]->fd = fd[0]; diff --git a/src/util/network.c b/src/util/network.c index 8ec365269..a054709d9 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -266,7 +266,6 @@ int GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) { int ret; - int eno; #ifdef MINGW ret = closesocket (desc->fd); @@ -274,9 +273,7 @@ GNUNET_NETWORK_socket_close (struct GNUNET_NETWORK_Handle *desc) #else ret = close (desc->fd); #endif - eno = errno; GNUNET_free (desc); - errno = eno; return (ret == 0) ? GNUNET_OK : GNUNET_SYSERR; } -- 2.25.1