]> granicus.if.org Git - curl/commitdiff
getpart: use correct variable type
authorMarcel Raad <raad@teamviewer.com>
Mon, 1 May 2017 11:17:57 +0000 (13:17 +0200)
committerMarcel Raad <raad@teamviewer.com>
Mon, 1 May 2017 11:17:57 +0000 (13:17 +0200)
This fixes the following clang warning:
getpart.c:201:17: warning: cast from function call of type 'CURLcode'
to non-matching type 'int' [-Wbad-function-cast]

tests/server/getpart.c

index 25758bd4eaa250e4ce5681d17877787b5d4b6796..bb8351bc3bb791de47e069d006b7fc2df4e81ff1 100644 (file)
@@ -190,7 +190,7 @@ static int appenddata(char  **dst_buf,   /* dest buffer */
 static int decodedata(char  **buf,   /* dest buffer */
                       size_t *len)   /* dest buffer data length */
 {
-  int error = 0;
+  CURLcode error = CURLE_OK;
   unsigned char *buf64 = NULL;
   size_t src_len = 0;
 
@@ -198,7 +198,7 @@ static int decodedata(char  **buf,   /* dest buffer */
     return GPE_OK;
 
   /* base64 decode the given buffer */
-  error = (int) Curl_base64_decode(*buf, &buf64, &src_len);
+  error = Curl_base64_decode(*buf, &buf64, &src_len);
   if(error)
     return GPE_OUT_OF_MEMORY;