diff options
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r-- | lib/http_digest.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/lib/http_digest.c b/lib/http_digest.c index 50c852405..03963dbc9 100644 --- a/lib/http_digest.c +++ b/lib/http_digest.c @@ -321,16 +321,16 @@ CURLcode Curl_output_digest(struct connectdata *conn, struct SessionHandle *data = conn->data; struct digestdata *d; - CURLcode rc; + CURLcode result; /* The CURL_OUTPUT_DIGEST_CONV macro below is for non-ASCII machines. It converts digest text to ASCII so the MD5 will be correct for what ultimately goes over the network. */ #define CURL_OUTPUT_DIGEST_CONV(a, b) \ - rc = Curl_convert_to_network(a, (char *)b, strlen((const char*)b)); \ - if(rc) { \ + result = Curl_convert_to_network(a, (char *)b, strlen((const char*)b)); \ + if(result) { \ free(b); \ - return rc; \ + return result; \ } if(proxy) { @@ -370,10 +370,12 @@ CURLcode Curl_output_digest(struct connectdata *conn, snprintf(cnoncebuf, sizeof(cnoncebuf), "%08x%08x%08x%08x", Curl_rand(data), Curl_rand(data), Curl_rand(data), Curl_rand(data)); - rc = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), - &cnonce, &cnonce_sz); - if(rc) - return rc; + + result = Curl_base64_encode(data, cnoncebuf, strlen(cnoncebuf), + &cnonce, &cnonce_sz); + if(result) + return result; + d->cnonce = cnonce; } |