From e23c52b3295a525fbaae9e7ed3e7061fea6dffc2 Mon Sep 17 00:00:00 2001 From: Marcel Raad Date: Sat, 25 May 2019 10:06:08 +0200 Subject: build: fix Codacy warnings Reduce variable scopes and remove redundant variable stores. Closes https://github.com/curl/curl/pull/3975 --- lib/vauth/digest.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'lib/vauth') diff --git a/lib/vauth/digest.c b/lib/vauth/digest.c index f9cdc9dd0..8cd4d83ed 100644 --- a/lib/vauth/digest.c +++ b/lib/vauth/digest.c @@ -357,7 +357,6 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, const char *service, char **outptr, size_t *outlen) { - CURLcode result = CURLE_OK; size_t i; MD5_context *ctxt; char *response = NULL; @@ -377,10 +376,12 @@ CURLcode Curl_auth_create_digest_md5_message(struct Curl_easy *data, char *spn = NULL; /* Decode the challenge message */ - result = auth_decode_digest_md5_message(chlg64, nonce, sizeof(nonce), - realm, sizeof(realm), - algorithm, sizeof(algorithm), - qop_options, sizeof(qop_options)); + CURLcode result = auth_decode_digest_md5_message(chlg64, nonce, + sizeof(nonce), realm, + sizeof(realm), algorithm, + sizeof(algorithm), + qop_options, + sizeof(qop_options)); if(result) return result; -- cgit v1.2.3