]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urldata: make 'negnpn' use less storage
authorDaniel Stenberg <daniel@haxx.se>
Mon, 8 Aug 2022 11:21:01 +0000 (13:21 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 8 Aug 2022 12:31:06 +0000 (14:31 +0200)
The connectdata struct field 'negnpn' never holds a value larger than
30, so an unsigned char saves 3 bytes struct space.

Closes #9279

lib/urldata.h

index 4f648778b0511500544207efcd2db1d6db4a8f00..0c252d12afd25fa3969f02e27c3b088ce6d938af 100644 (file)
@@ -1119,7 +1119,8 @@ struct connectdata {
   int localportrange;
   int cselect_bits; /* bitmask of socket events */
   int waitfor;      /* current READ/WRITE bits to wait for */
-  int negnpn; /* APLN or NPN TLS negotiated protocol, CURL_HTTP_VERSION* */
+  unsigned char negnpn; /* APLN or NPN TLS negotiated protocol,
+                           a CURL_HTTP_VERSION* value */
 
 #if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
   int socks5_gssapi_enctype;