summaryrefslogtreecommitdiff
path: root/lib/http_digest.c
diff options
context:
space:
mode:
authorSteve Holme <steve_holme@hotmail.com>2014-10-28 22:42:42 +0000
committerSteve Holme <steve_holme@hotmail.com>2014-10-28 22:45:32 +0000
commit085081fc6e7da0b43c2bc1930c643dd7efb7f2cc (patch)
tree54cb71294c863add2b8c19f77ed1108b8905087d /lib/http_digest.c
parentb790bdf46b7b3c9f5269163b25505f7b9ae1e319 (diff)
downloadcurl-085081fc6e7da0b43c2bc1930c643dd7efb7f2cc.tar.gz
code cleanup: We prefer 'CURLcode result'
Diffstat (limited to 'lib/http_digest.c')
-rw-r--r--lib/http_digest.c18
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;
}