[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] [libmicrohttpd] 02/02: use booleans more nicely
From: |
gnunet |
Subject: |
[GNUnet-SVN] [libmicrohttpd] 02/02: use booleans more nicely |
Date: |
Thu, 24 Oct 2019 17:56:41 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository libmicrohttpd.
commit 3e2ba2b1ced0b4c9d13961e89e43c3932399f6d6
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Oct 24 17:54:14 2019 +0200
use booleans more nicely
---
src/microhttpd/daemon.c | 8 ++++----
src/microhttpd/internal.h | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
index e5d40861..1e5716e3 100644
--- a/src/microhttpd/daemon.c
+++ b/src/microhttpd/daemon.c
@@ -3124,10 +3124,10 @@ MHD_add_connection (struct MHD_Daemon *daemon,
_ ("Failed to set nonblocking mode on new client socket: %s\n"),
MHD_socket_last_strerr_ ());
#endif
- sk_nonbl = 0;
+ sk_nonbl = false;
}
else
- sk_nonbl = ! 0;
+ sk_nonbl = true;
if ( (0 != (daemon->options & MHD_USE_TURBO)) &&
(! MHD_socket_noninheritable_ (client_socket)) )
@@ -3200,7 +3200,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
s = accept (fd,
addr,
&addrlen);
- sk_nonbl = 0;
+ sk_nonbl = false;
#endif /* ! USE_ACCEPT4 */
if ( (MHD_INVALID_SOCKET == s) ||
(addrlen <= 0) )
@@ -3281,7 +3281,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
#endif
}
else
- sk_nonbl = ! 0;
+ sk_nonbl = true;
#endif /* !USE_ACCEPT4 || !HAVE_SOCK_NONBLOCK */
#if ! defined(USE_ACCEPT4) || ! defined(SOCK_CLOEXEC)
if (! MHD_socket_noninheritable_ (s))
diff --git a/src/microhttpd/internal.h b/src/microhttpd/internal.h
index 5cf35790..fa66d265 100644
--- a/src/microhttpd/internal.h
+++ b/src/microhttpd/internal.h
@@ -874,7 +874,7 @@ struct MHD_Connection
/**
* true if #socket_fd is non-blocking, false otherwise.
*/
- bool sk_nonblck; // FIXME: hopefully dead?
+ bool sk_nonblck;
/**
* Indicate whether connection socket has TCP_CORK / Nagle’s algorithm
turned on/off
--
To stop receiving notification emails like this one, please contact
address@hidden.