aboutsummaryrefslogtreecommitdiff
path: root/lib/connect.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-02-25 11:17:53 +0100
committerDaniel Stenberg <daniel@haxx.se>2019-02-27 08:37:56 +0100
commit62a2534e4c31109b618a633db0970553c70d8061 (patch)
tree306c55291c9dbc4736835f1e1e32947f5bdf5a33 /lib/connect.c
parent50482b8c0a2cf5315e66d182998c8fc4901ffb2d (diff)
urldata: convert bools to bitfields and move to end
This allows the compiler to pack and align the structs better in memory. For a rather feature-complete build on x86_64 Linux, gcc 8.1.2 makes the Curl_easy struct 4.9% smaller. From 6312 bytes to 6000. Removed an unused struct field. No functionality changes. Closes #3610
Diffstat (limited to 'lib/connect.c')
-rw-r--r--lib/connect.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/connect.c b/lib/connect.c
index 89216200d..a53d79c21 100644
--- a/lib/connect.c
+++ b/lib/connect.c
@@ -1434,7 +1434,7 @@ void Curl_conncontrol(struct connectdata *conn,
if((ctrl == CONNCTRL_STREAM) &&
(conn->handler->flags & PROTOPT_STREAM))
DEBUGF(infof(conn->data, "Kill stream: %s\n", reason));
- else if(closeit != conn->bits.close) {
+ else if((bit)closeit != conn->bits.close) {
DEBUGF(infof(conn->data, "Marked for [%s]: %s\n",
closeit?"closure":"keep alive", reason));
conn->bits.close = closeit; /* the only place in the source code that