From a29d34b0b7fd9d5b31f0ac10e4f7ee5b32f3e09a Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Mon, 8 Aug 2022 13:21:01 +0200 Subject: [PATCH] urldata: make 'negnpn' use less storage 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/urldata.h b/lib/urldata.h index 4f648778b0..0c252d12af 100644 --- a/lib/urldata.h +++ b/lib/urldata.h @@ -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;