aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-07-25 20:19:11 +0200
committerChristian Grothoff <christian@grothoff.org>2019-07-25 20:19:11 +0200
commit497c1d68bee5b9acac92b8d92b12d6a284cc8399 (patch)
tree166d73db59d09b7eb14a9a23e41c7b744a88378c
parent16d0ccc48b2715a1b83d08c178af1d4d6647bd81 (diff)
downloadlibmicrohttpd-497c1d68bee5b9acac92b8d92b12d6a284cc8399.tar.gz
libmicrohttpd-497c1d68bee5b9acac92b8d92b12d6a284cc8399.zip
simplify
-rw-r--r--src/microhttpd/mhd_send.c22
1 files changed, 5 insertions, 17 deletions
diff --git a/src/microhttpd/mhd_send.c b/src/microhttpd/mhd_send.c
index 49fd1edf..111fdcfe 100644
--- a/src/microhttpd/mhd_send.c
+++ b/src/microhttpd/mhd_send.c
@@ -48,11 +48,6 @@ post_cork_setsockopt (struct MHD_Connection *connection,
48 const MHD_SCKT_OPT_BOOL_ on_val = 1; 48 const MHD_SCKT_OPT_BOOL_ on_val = 1;
49 49
50#if TCP_CORK 50#if TCP_CORK
51 ret = setsockopt (connection->socket_fd,
52 IPPROTO_TCP,
53 TCP_CORK,
54 (const void *) &on_val,
55 sizeof (on_val));
56#elif TCP_NODELAY 51#elif TCP_NODELAY
57 ret = setsockopt (connection->socket_fd, 52 ret = setsockopt (connection->socket_fd,
58 IPPROTO_TCP, 53 IPPROTO_TCP,
@@ -92,18 +87,11 @@ pre_cork_setsockopt (struct MHD_Connection *connection,
92 87
93 ret = -1; 88 ret = -1;
94#if TCP_CORK 89#if TCP_CORK
95 if (want_cork) 90 ret = setsockopt (connection->socket_fd,
96 ret = setsockopt (connection->socket_fd, 91 IPPROTO_TCP,
97 IPPROTO_TCP, 92 TCP_CORK,
98 TCP_CORK, 93 (const void *) want_cork ? &on_val : &off_val,
99 (const void *) &on_val, 94 sizeof (on_val));
100 sizeof (on_val));
101 else
102 ret = setsockopt (connection->socket_fd,
103 IPPROTO_TCP,
104 TCP_CORK,
105 (const void *) &off_val,
106 sizeof (off_val));
107#elif TCP_NODELAY 95#elif TCP_NODELAY
108 ret = setsockopt (connection->socket_fd, 96 ret = setsockopt (connection->socket_fd,
109 IPPROTO_TCP, 97 IPPROTO_TCP,