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/cookie.h | |
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/cookie.h')
-rw-r--r-- | lib/cookie.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/cookie.h b/lib/cookie.h index 066396f0d..271999d5e 100644 --- a/lib/cookie.h +++ b/lib/cookie.h @@ -34,12 +34,12 @@ struct Cookie { char *domain; /* domain = <this> */ curl_off_t expires; /* expires = <this> */ char *expirestr; /* the plain text version */ - bool tailmatch; /* whether we do tail-matching of the domain name */ /* RFC 2109 keywords. Version=1 means 2109-compliant cookie sending */ char *version; /* Version = <value> */ char *maxage; /* Max-Age = <value> */ + bool tailmatch; /* whether we do tail-matching of the domain name */ bool secure; /* whether the 'secure' keyword was used */ bool livecookie; /* updated from a server, not a stored file */ bool httponly; /* true if the httponly directive is present */ @@ -61,8 +61,8 @@ struct CookieInfo { struct Cookie *cookies[COOKIE_HASH_SIZE]; char *filename; /* file we read from/write to */ - bool running; /* state info, for cookie adding information */ long numcookies; /* number of cookies in the "jar" */ + bool running; /* state info, for cookie adding information */ bool newsession; /* new session, discard session cookies on load */ int lastct; /* last creation-time used in the jar */ }; |