libmicrohttpd

HTTP/1.x server C library (MHD 1.x, stable)
Log | Files | Refs | Submodules | README | LICENSE

commit 3e2ba2b1ced0b4c9d13961e89e43c3932399f6d6
parent 13d3805dc696c2b72826ba862ed1347f17634510
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 24 Oct 2019 17:54:14 +0200

use booleans more nicely

Diffstat:
Msrc/microhttpd/daemon.c | 8++++----
Msrc/microhttpd/internal.h | 2+-
2 files changed, 5 insertions(+), 5 deletions(-)

diff --git 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 @@ -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