commit a6462a8a940b68f6f4eab628abcfb9e6605b6652
parent 02ca4cb5de7bea71556b1e692565764cae4dc7ba
Author: Evgeny Grin (Karlson2k) <k2k@narod.ru>
Date: Tue, 11 Oct 2016 15:21:26 +0000
Renamed 'MHD_make_invalid_pipe_' -> 'MHD_itc_set_invalid_'
Diffstat:
2 files changed, 10 insertions(+), 14 deletions(-)
diff --git a/src/microhttpd/daemon.c b/src/microhttpd/daemon.c
@@ -4437,7 +4437,7 @@ MHD_start_daemon_va (unsigned int flags,
daemon->pool_increment = MHD_BUF_INC_SIZE;
daemon->unescape_callback = &unescape_wrapper;
daemon->connection_timeout = 0; /* no timeout */
- MHD_make_invalid_pipe_ (daemon->itc);
+ MHD_itc_set_invalid_ (daemon->itc);
#ifdef SOMAXCONN
daemon->listen_backlog_size = SOMAXCONN;
#else /* !SOMAXCONN */
diff --git a/src/microhttpd/mhd_itc.h b/src/microhttpd/mhd_itc.h
@@ -126,12 +126,10 @@ static const uint64_t _MHD_itc_wr_data = 1;
#define MHD_ITC_IS_VALID_(itc) (-1 != (itc))
/**
- * Setup uninitialized @a pip data structure.
+ * Set @a itc to invalid value.
+ * @param itc the itc to set
*/
-#define MHD_make_invalid_pipe_(pip) do { \
- pip = -1; \
- } while (0)
-
+#define MHD_itc_set_invalid_(itc) ((itc) = -1)
/**
* Change itc FD options to be non-blocking. As we already did this
@@ -222,11 +220,10 @@ static const uint64_t _MHD_itc_wr_data = 1;
#define MHD_ITC_IS_VALID_(itc) (-1 != (itc).fd[0])
/**
- * Setup uninitialized @a pip data structure.
+ * Set @a itc to invalid value.
+ * @param itc the itc to set
*/
-#define MHD_make_invalid_pipe_(pip) do { \
- (pip).fd[0] = (pip).fd[1] = -1; \
- } while (0)
+#define MHD_itc_set_invalid_(itc) ((itc).fd[0] = (itc).fd[1] = -1)
/**
* Change itc FD options to be non-blocking.
@@ -315,11 +312,10 @@ MHD_itc_nonblocking_ (MHD_itc_ itc);
#define MHD_ITC_IS_VALID_(itc) (MHD_INVALID_SOCKET != (itc).sk[0])
/**
- * Setup uninitialized @a pip data structure.
+ * Set @a itc to invalid value.
+ * @param itc the itc to set
*/
-#define MHD_make_invalid_pipe_(pip) do { \
- pip.sk[0] = pip.sk[1] = MHD_INVALID_SOCKET; \
- } while (0)
+#define MHD_itc_set_invalid_(itc) ((itc).sk[0] = (itc).sk[1] = MHD_INVALID_SOCKET)
#define MHD_itc_nonblocking_(pip) (MHD_socket_nonblocking_((pip).sk[0]) && MHD_socket_nonblocking_((pip).sk[1]))