1
0
mirror of https://github.com/moparisthebest/curl synced 2025-03-11 07:39:50 -04:00

base64: Use 'CURLcode result' for curl result codes

This commit is contained in:
Steve Holme 2016-03-13 17:14:57 +00:00
parent 9eb158821f
commit 0e16de870f

View File

@ -5,7 +5,7 @@
* | (__| |_| | _ <| |___ * | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____| * \___|\___/|_| \_\_____|
* *
* Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * Copyright (C) 1998 - 2016, Daniel Stenberg, <daniel@haxx.se>, et al.
* *
* This software is licensed as described in the file COPYING, which * This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms * you should have received as part of this distribution. The terms
@ -173,7 +173,7 @@ static CURLcode base64_encode(const char *table64,
const char *inputbuff, size_t insize, const char *inputbuff, size_t insize,
char **outptr, size_t *outlen) char **outptr, size_t *outlen)
{ {
CURLcode error; CURLcode result;
unsigned char ibuf[3]; unsigned char ibuf[3];
unsigned char obuf[4]; unsigned char obuf[4];
int i; int i;
@ -199,10 +199,10 @@ static CURLcode base64_encode(const char *table64,
* not the host encoding. And we can't change the actual input * not the host encoding. And we can't change the actual input
* so we copy it to a buffer, translate it, and use that instead. * so we copy it to a buffer, translate it, and use that instead.
*/ */
error = Curl_convert_clone(data, indata, insize, &convbuf); result = Curl_convert_clone(data, indata, insize, &convbuf);
if(error) { if(result) {
free(output); free(output);
return error; return result;
} }
if(convbuf) if(convbuf)