[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.
- [libmicrohttpd] branch master updated (afb8ed41 -> 1b8c52f1), gnunet, 2022/05/31
- [libmicrohttpd] 01/10: connection.c: fixed compiler warnings, gnunet, 2022/05/31
- [libmicrohttpd] 02/10: MHD_FIND_ADD_CC_{C,LD}FLAG_IFELSE: added new autoconf macros, gnunet, 2022/05/31
- [libmicrohttpd] 04/10: MHD_get_timeout*(): improved doxy, gnunet, 2022/05/31
- [libmicrohttpd] 05/10: Fixed wrong variable type used for result of gnutls_priority_init(), gnunet, 2022/05/31
- [libmicrohttpd] 06/10: configure: disabled one more warning on clang, gnunet, 2022/05/31
- [libmicrohttpd] 07/10: mhd_sockets: muted compiler warning with very minor optimisation,
gnunet <=
- [libmicrohttpd] 08/10: daemon.c: fixed possible uninitialized value, gnunet, 2022/05/31
- [libmicrohttpd] 03/10: configure: added more workarounds for clang, gnunet, 2022/05/31
- [libmicrohttpd] 09/10: Fixed 'int' instead of 'MHD_Result', gnunet, 2022/05/31
- [libmicrohttpd] 10/10: daemon: muted compiler warning, refactored code for readability, gnunet, 2022/05/31