diff options
author | Steve Holme <steve_holme@hotmail.com> | 2014-11-14 20:43:15 +0000 |
---|---|---|
committer | Steve Holme <steve_holme@hotmail.com> | 2014-11-14 22:00:04 +0000 |
commit | 7faaca71186f5b25c77d77af8f4c755675337792 (patch) | |
tree | 538dfe30a464d7a396d777965f421c37a7f8f625 | |
parent | 5f3824a5aa7298c9a95c66fc13619df17fabd98e (diff) |
ntlm: We prefer 'CURLcode result'
-rw-r--r-- | lib/curl_ntlm_msgs.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/lib/curl_ntlm_msgs.c b/lib/curl_ntlm_msgs.c index 5112b5369..f23a306a8 100644 --- a/lib/curl_ntlm_msgs.c +++ b/lib/curl_ntlm_msgs.c @@ -276,17 +276,17 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, (*) -> Optional */ + CURLcode result = CURLE_OK; size_t size = 0; unsigned char *buffer = NULL; - CURLcode error; #if defined(CURL_DISABLE_VERBOSE_STRINGS) || defined(USE_WINDOWS_SSPI) (void)data; #endif - error = Curl_base64_decode(header, &buffer, &size); - if(error) - return error; + result = Curl_base64_decode(header, &buffer, &size); + if(result) + return result; if(!buffer) { infof(data, "NTLM handshake failure (empty type-2 message)\n"); @@ -312,11 +312,11 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, memcpy(ntlm->nonce, &buffer[24], 8); if(ntlm->flags & NTLMFLAG_NEGOTIATE_TARGET_INFO) { - error = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm); - if(error) { + result = Curl_ntlm_decode_type2_target(data, buffer, size, ntlm); + if(result) { free(buffer); infof(data, "NTLM handshake failure (bad type-2 message)\n"); - return error; + return result; } } @@ -332,7 +332,7 @@ CURLcode Curl_ntlm_decode_type2_message(struct SessionHandle *data, free(buffer); #endif - return CURLE_OK; + return result; } #ifndef USE_WINDOWS_SSPI |