diff options
author | Daniel Stenberg <daniel@haxx.se> | 2020-11-07 14:17:53 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-11-07 18:10:21 +0100 |
commit | 5d903ce3a3443f6566c33ca43057860270142224 (patch) | |
tree | d8c323e0d4ccb15094aa4a0d53c70e686639b4c6 /lib/altsvc.c | |
parent | 65bc6825240175ee4140e0fe8bb2daaf2ebd68e8 (diff) | |
download | curl-5d903ce3a3443f6566c33ca43057860270142224.tar.gz |
altsvc: minimize variable scope and avoid "DEAD_STORE"
Closes #6182
Diffstat (limited to 'lib/altsvc.c')
-rw-r--r-- | lib/altsvc.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/altsvc.c b/lib/altsvc.c index 6a2a5f57b..4ab77fdfc 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 = ""; |