1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 06:25:03 -05:00

negotiate: Use 'CURLcode result' for curl result codes

This commit is contained in:
Steve Holme 2016-03-13 17:09:58 +00:00
parent d7e3942814
commit 9eb158821f

View File

@ -234,14 +234,14 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
char *encoded = NULL; char *encoded = NULL;
size_t len = 0; size_t len = 0;
char *userp; char *userp;
CURLcode error; CURLcode result;
error = Curl_base64_encode(conn->data, result = Curl_base64_encode(conn->data,
(const char*)neg_ctx->output_token, (const char*)neg_ctx->output_token,
neg_ctx->output_token_length, neg_ctx->output_token_length,
&encoded, &len); &encoded, &len);
if(error) if(result)
return error; return result;
if(!len) if(!len)
return CURLE_REMOTE_ACCESS_DENIED; return CURLE_REMOTE_ACCESS_DENIED;
@ -257,7 +257,9 @@ CURLcode Curl_output_negotiate(struct connectdata *conn, bool proxy)
Curl_safefree(conn->allocptr.userpwd); Curl_safefree(conn->allocptr.userpwd);
conn->allocptr.userpwd = userp; conn->allocptr.userpwd = userp;
} }
free(encoded); free(encoded);
return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK; return (userp == NULL) ? CURLE_OUT_OF_MEMORY : CURLE_OK;
} }