diff options
author | Daniel Stenberg <daniel@haxx.se> | 2023-01-01 11:26:22 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2023-01-04 15:36:36 +0100 |
commit | 1485e8921398f434c38528127c8ba0584324e10d (patch) | |
tree | bc7cda499da8b6e16e4bb366e91ed0d1a9685bc9 /lib/pop3.c | |
parent | 7ad8a7ba9ebdedceafe8859d3bd4d22ee447648d (diff) | |
download | curl-1485e8921398f434c38528127c8ba0584324e10d.tar.gz |
misc: reduce struct and struct field sizes
- by using BIT() instead of bool
- imap: shrink struct
- ftp: make state 'unsigned char'
- ftp: sort ftp_conn struct entries on size
- urldata: use smaller fields for SSL version info storage
- pop3: reduce the pop3_conn struct size
- smtp: reduce the size of the smtp structs
Closes #10186
Diffstat (limited to 'lib/pop3.c')
-rw-r--r-- | lib/pop3.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/pop3.c b/lib/pop3.c index ab5c7493e..36707e535 100644 --- a/lib/pop3.c +++ b/lib/pop3.c @@ -370,6 +370,7 @@ static CURLcode pop3_perform_upgrade_tls(struct Curl_easy *data, /* Start the SSL connection */ struct pop3_conn *pop3c = &conn->proto.pop3c; CURLcode result; + bool ssldone = FALSE; if(!Curl_conn_is_ssl(conn, FIRSTSOCKET)) { result = Curl_ssl_cfilter_add(data, conn, FIRSTSOCKET); @@ -377,9 +378,10 @@ static CURLcode pop3_perform_upgrade_tls(struct Curl_easy *data, goto out; } - result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &pop3c->ssldone); + result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); if(!result) { + pop3c->ssldone = ssldone; if(pop3c->state != POP3_UPGRADETLS) state(data, POP3_UPGRADETLS); @@ -1056,7 +1058,9 @@ static CURLcode pop3_multi_statemach(struct Curl_easy *data, bool *done) struct pop3_conn *pop3c = &conn->proto.pop3c; if((conn->handler->flags & PROTOPT_SSL) && !pop3c->ssldone) { - result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &pop3c->ssldone); + bool ssldone = FALSE; + result = Curl_conn_connect(data, FIRSTSOCKET, FALSE, &ssldone); + pop3c->ssldone = ssldone; if(result || !pop3c->ssldone) return result; } |