From: Daniel Stenberg Date: Sat, 7 Nov 2020 13:17:53 +0000 (+0100) Subject: altsvc: minimize variable scope and avoid "DEAD_STORE" X-Git-Tag: curl-7_74_0~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d903ce3a3443f6566c33ca43057860270142224;p=thirdparty%2Fcurl.git altsvc: minimize variable scope and avoid "DEAD_STORE" Closes #6182 --- diff --git a/lib/altsvc.c b/lib/altsvc.c index 6a2a5f57bc..4ab77fdfc8 100644 --- a/lib/altsvc.c +++ b/lib/altsvc.c @@ -451,7 +451,6 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data, { const char *p = value; size_t len; - enum alpnid dstalpnid = srcalpnid; /* the same by default */ char namebuf[MAX_ALTSVC_HOSTLEN] = ""; char alpnbuf[MAX_ALTSVC_ALPNLEN] = ""; struct altsvc *as; @@ -478,7 +477,7 @@ CURLcode Curl_altsvc_parse(struct Curl_easy *data, do { if(*p == '=') { /* [protocol]="[host][:port]" */ - dstalpnid = alpn2alpnid(alpnbuf); + enum alpnid dstalpnid = alpn2alpnid(alpnbuf); /* the same by default */ p++; if(*p == '\"') { const char *dsthost = "";