summaryrefslogtreecommitdiff
path: root/lib/asyn-thread.c
diff options
context:
space:
mode:
authorErik Olsson <erik.eo.olsson@gmail.com>2021-01-16 22:17:51 +0100
committerJay Satiro <raysatiro@yahoo.com>2021-01-20 22:52:34 -0500
commit0a5827571f97feded67d6abc837c332224917f75 (patch)
treece65e4f8137b34233aa9a6287b44fb5a7f9b13dc /lib/asyn-thread.c
parent46f4736356a436dfb0fd26f41e63f6dd76514f53 (diff)
downloadcurl-0a5827571f97feded67d6abc837c332224917f75.tar.gz
lib: save a bit of space with some structure packing
- Reorder some internal struct members so that less padding is used. This is an attempt at saving a bit of space by packing some structs (using pahole to find the holes) where it might make sense to do so without losing readability. I.e., I tried to avoid separating fields that seem grouped together (like the cwd... fields in struct ftp_conn for instance). Also abstained from touching fields behind conditional macros as that quickly can get complicated. Closes https://github.com/curl/curl/pull/6483
Diffstat (limited to 'lib/asyn-thread.c')
-rw-r--r--lib/asyn-thread.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/asyn-thread.c b/lib/asyn-thread.c
index 08c7c3bb1..9caa1be09 100644
--- a/lib/asyn-thread.c
+++ b/lib/asyn-thread.c
@@ -160,10 +160,9 @@ static bool init_resolve_thread(struct connectdata *conn,
struct thread_sync_data {
curl_mutex_t *mtx;
int done;
-
+ int port;
char *hostname; /* hostname to resolve, Curl_async.hostname
duplicate */
- int port;
#ifdef USE_SOCKETPAIR
struct connectdata *conn;
curl_socket_t sock_pair[2]; /* socket pair */