gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[libmicrohttpd] 07/10: mhd_sockets: muted compiler warning with very min


From: gnunet
Subject: [libmicrohttpd] 07/10: mhd_sockets: muted compiler warning with very minor optimisation
Date: Tue, 31 May 2022 19:38:16 +0200

This is an automated email from the git hooks/post-receive script.

karlson2k pushed a commit to branch master
in repository libmicrohttpd.

commit 887a554376769ca831d922a5bb4190e8d9ffedcb
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
AuthorDate: Tue May 31 19:42:58 2022 +0300

    mhd_sockets: muted compiler warning with very minor optimisation
---
 src/microhttpd/mhd_sockets.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/src/microhttpd/mhd_sockets.c b/src/microhttpd/mhd_sockets.c
index ba459ce5..2e49652c 100644
--- a/src/microhttpd/mhd_sockets.c
+++ b/src/microhttpd/mhd_sockets.c
@@ -516,16 +516,14 @@ MHD_socket_create_listen_ (int pf)
 
 #if defined(MHD_POSIX_SOCKETS) && (defined(SOCK_CLOEXEC) || \
   defined(SOCK_NOSIGPIPE) )
+
+  cloexec_set = (SOCK_CLOEXEC_OR_ZERO != 0);
+#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_)
+  nosigpipe_set = (SOCK_NOSIGPIPE_OR_ZERO != 0);
+#endif /* SOCK_NOSIGPIPE ||  MHD_socket_nosignal_ */
   fd = socket (pf,
                SOCK_STREAM | SOCK_CLOEXEC | SOCK_NOSIGPIPE_OR_ZERO,
                0);
-  if (MHD_INVALID_SOCKET != fd)
-  {
-    cloexec_set = (SOCK_CLOEXEC_OR_ZERO != 0);
-#if defined(SOCK_NOSIGPIPE) || defined(MHD_socket_nosignal_)
-    nosigpipe_set = (SOCK_NOSIGPIPE_OR_ZERO != 0);
-#endif /* SOCK_NOSIGPIPE ||  MHD_socket_nosignal_ */
-  }
 #elif defined(MHD_WINSOCK_SOCKETS) && defined(WSA_FLAG_NO_HANDLE_INHERIT)
   fd = WSASocketW (pf,
                    SOCK_STREAM,

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]