From: Daniel Stenberg Date: Fri, 19 Apr 2024 12:12:36 +0000 (+0200) Subject: http_aws_sigv4: remove useless assignment X-Git-Tag: curl-8_8_0~178 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac49152e26c933c1895ece4c7498a8e632d65899;p=thirdparty%2Fcurl.git http_aws_sigv4: remove useless assignment This code assigned the variable the same value it already had Spotted by CodeSonar Closes #13426 --- diff --git a/lib/http_aws_sigv4.c b/lib/http_aws_sigv4.c index c9382918ed..98cc033a08 100644 --- a/lib/http_aws_sigv4.c +++ b/lib/http_aws_sigv4.c @@ -158,10 +158,7 @@ static CURLcode make_headers(struct Curl_easy *data, msnprintf(date_full_hdr, DATE_FULL_HDR_LEN, "x-%s-date:%s", provider1, timestamp); - if(Curl_checkheaders(data, STRCONST("Host"))) { - head = NULL; - } - else { + if(!Curl_checkheaders(data, STRCONST("Host"))) { char full_host[FULL_HOST_LEN + 1]; if(data->state.aptr.host) {