aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-10-24 17:54:14 +0200
committerChristian Grothoff <christian@grothoff.org>2019-10-24 17:54:14 +0200
commit3e2ba2b1ced0b4c9d13961e89e43c3932399f6d6 (patch)
tree3ce093979bfd4409500c829edd768487aeee24c8
parent13d3805dc696c2b72826ba862ed1347f17634510 (diff)
downloadlibmicrohttpd-3e2ba2b1ced0b4c9d13961e89e43c3932399f6d6.tar.gz
libmicrohttpd-3e2ba2b1ced0b4c9d13961e89e43c3932399f6d6.zip
use booleans more nicely
-rw-r--r--src/microhttpd/daemon.c8
-rw-r--r--src/microhttpd/internal.h2
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,
3124 _ ("Failed to set nonblocking mode on new client socket: %s\n"), 3124 _ ("Failed to set nonblocking mode on new client socket: %s\n"),
3125 MHD_socket_last_strerr_ ()); 3125 MHD_socket_last_strerr_ ());
3126#endif 3126#endif
3127 sk_nonbl = 0; 3127 sk_nonbl = false;
3128 } 3128 }
3129 else 3129 else
3130 sk_nonbl = ! 0; 3130 sk_nonbl = true;
3131 3131
3132 if ( (0 != (daemon->options & MHD_USE_TURBO)) && 3132 if ( (0 != (daemon->options & MHD_USE_TURBO)) &&
3133 (! MHD_socket_noninheritable_ (client_socket)) ) 3133 (! MHD_socket_noninheritable_ (client_socket)) )
@@ -3200,7 +3200,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
3200 s = accept (fd, 3200 s = accept (fd,
3201 addr, 3201 addr,
3202 &addrlen); 3202 &addrlen);
3203 sk_nonbl = 0; 3203 sk_nonbl = false;
3204#endif /* ! USE_ACCEPT4 */ 3204#endif /* ! USE_ACCEPT4 */
3205 if ( (MHD_INVALID_SOCKET == s) || 3205 if ( (MHD_INVALID_SOCKET == s) ||
3206 (addrlen <= 0) ) 3206 (addrlen <= 0) )
@@ -3281,7 +3281,7 @@ MHD_accept_connection (struct MHD_Daemon *daemon)
3281#endif 3281#endif
3282 } 3282 }
3283 else 3283 else
3284 sk_nonbl = ! 0; 3284 sk_nonbl = true;
3285#endif /* !USE_ACCEPT4 || !HAVE_SOCK_NONBLOCK */ 3285#endif /* !USE_ACCEPT4 || !HAVE_SOCK_NONBLOCK */
3286#if ! defined(USE_ACCEPT4) || ! defined(SOCK_CLOEXEC) 3286#if ! defined(USE_ACCEPT4) || ! defined(SOCK_CLOEXEC)
3287 if (! MHD_socket_noninheritable_ (s)) 3287 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
874 /** 874 /**
875 * true if #socket_fd is non-blocking, false otherwise. 875 * true if #socket_fd is non-blocking, false otherwise.
876 */ 876 */
877 bool sk_nonblck; // FIXME: hopefully dead? 877 bool sk_nonblck;
878 878
879 /** 879 /**
880 * Indicate whether connection socket has TCP_CORK / Nagle’s algorithm turned on/off 880 * Indicate whether connection socket has TCP_CORK / Nagle’s algorithm turned on/off