diff options
author | Erik Olsson <erik.eo.olsson@gmail.com> | 2021-01-16 22:17:51 +0100 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2021-01-20 22:52:34 -0500 |
commit | 0a5827571f97feded67d6abc837c332224917f75 (patch) | |
tree | ce65e4f8137b34233aa9a6287b44fb5a7f9b13dc /lib/tftp.c | |
parent | 46f4736356a436dfb0fd26f41e63f6dd76514f53 (diff) | |
download | curl-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/tftp.c')
-rw-r--r-- | lib/tftp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index b4bf129dd..3f1d1b51b 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -132,7 +132,6 @@ struct tftp_state_data { time_t start_time; time_t max_time; time_t rx_time; - unsigned short block; struct Curl_sockaddr_storage local_addr; struct Curl_sockaddr_storage remote_addr; curl_socklen_t remote_addrlen; @@ -140,6 +139,7 @@ struct tftp_state_data { int sbytes; int blksize; int requested_blksize; + unsigned short block; struct tftp_packet rpacket; struct tftp_packet spacket; }; |