diff options
author | Daniel Stenberg <daniel@haxx.se> | 2014-10-23 22:56:35 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2014-10-24 08:23:19 +0200 |
commit | 0eb3d15ccb419bfda41ee31bdbf73c36facc7388 (patch) | |
tree | 0c4abf7bf4bac279cbcfd708e1cdd1bcdf29bb77 /lib/x509asn1.c | |
parent | 1752e9c088d9bb7a3156dba9c66f7f64dd87afa9 (diff) | |
download | curl-0eb3d15ccb419bfda41ee31bdbf73c36facc7388.tar.gz |
code cleanup: we prefer 'CURLcode result'
... for the local variable name in functions holding the return
code. Using the same name universally makes code easier to read and
follow.
Also, unify code for checking for CURLcode errors with:
if(result) or if(!result)
instead of
if(result == CURLE_OK), if(CURLE_OK == result) or if(result != CURLE_OK)
Diffstat (limited to 'lib/x509asn1.c')
-rw-r--r-- | lib/x509asn1.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/x509asn1.c b/lib/x509asn1.c index e100e07f4..af08cee54 100644 --- a/lib/x509asn1.c +++ b/lib/x509asn1.c @@ -879,7 +879,7 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, char * cp1; size_t cl1; char * cp2; - CURLcode cc; + CURLcode result; unsigned long version; size_t i; size_t j; @@ -993,11 +993,11 @@ CURLcode Curl_extract_certinfo(struct connectdata * conn, free((char *) ccp); /* Generate PEM certificate. */ - cc = Curl_base64_encode(data, cert.certificate.beg, - cert.certificate.end - cert.certificate.beg, - &cp1, &cl1); - if(cc != CURLE_OK) - return cc; + result = Curl_base64_encode(data, cert.certificate.beg, + cert.certificate.end - cert.certificate.beg, + &cp1, &cl1); + if(result) + return result; /* Compute the number of characters in final certificate string. Format is: -----BEGIN CERTIFICATE-----\n <max 64 base64 characters>\n |