From: Christian Grothoff Date: Tue, 20 Oct 2009 19:28:16 +0000 (+0000) Subject: check return codes everywhere X-Git-Tag: initial-import-from-subversion-38251~23295 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=a4ef231fcbe497ed4c6b7f0f4dfdfb421bc24d4f;p=oweals%2Fgnunet.git check return codes everywhere --- diff --git a/src/util/connection.c b/src/util/connection.c index fa8430638..7e4825e45 100644 --- a/src/util/connection.c +++ b/src/util/connection.c @@ -708,7 +708,7 @@ connect_probe_continuation (void *cls, (GNUNET_OK != GNUNET_NETWORK_socket_getsockopt (ap->sock, SOL_SOCKET, SO_ERROR, &error, &len)) || (error != 0) || (errno != 0) ) { - GNUNET_NETWORK_socket_close (ap->sock); + GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (ap->sock)); GNUNET_free (ap); if ( (NULL == h->ap_head) && (h->dns_active == GNUNET_NO) ) @@ -724,7 +724,7 @@ connect_probe_continuation (void *cls, /* cancel all other attempts */ while (NULL != (pos = h->ap_head)) { - GNUNET_NETWORK_socket_close (pos->sock); + GNUNET_break (GNUNET_OK == GNUNET_NETWORK_socket_close (pos->sock)); GNUNET_SCHEDULER_cancel (h->sched, pos->task); GNUNET_CONTAINER_DLL_remove (h->ap_head, h->ap_tail, pos); GNUNET_free (pos); diff --git a/src/util/network.c b/src/util/network.c index b5e65de60..dfdd44fa6 100644 --- a/src/util/network.c +++ b/src/util/network.c @@ -186,7 +186,7 @@ GNUNET_NETWORK_socket_accept (const struct GNUNET_NETWORK_Handle *desc, #ifndef MINGW if (ret->fd >= FD_SETSIZE) { - close (ret->fd); + GNUNET_break (0 == close (ret->fd)); GNUNET_free (ret); errno = EMFILE; return NULL; @@ -481,7 +481,7 @@ GNUNET_NETWORK_socket_create (int domain, int type, int protocol) #ifndef MINGW if (ret->fd >= FD_SETSIZE) { - close (ret->fd); + GNUNET_break (0 == close (ret->fd)); GNUNET_free (ret); errno = EMFILE; return NULL;