]> granicus.if.org Git - curl/commitdiff
curl: fix callback functions to match prototype
authorHanno Böck <hanno@hboeck.de>
Thu, 30 Mar 2017 12:59:14 +0000 (14:59 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 30 Mar 2017 12:59:14 +0000 (14:59 +0200)
The function tool_debug_cb doesn't match curl_debug_callback in curl.h
(unsigned vs. signed char* for 3rd param).

Bug: https://curl.haxx.se/mail/lib-2017-03/0120.html

src/tool_cb_dbg.c
src/tool_cb_dbg.h

index f4252ad8827f94f559ab61ff31c4629d672cb918..4eeb7b21018ea3f0750504bcf3ba62a5eb94ed60 100644 (file)
@@ -41,7 +41,7 @@ static void dump(const char *timebuf, const char *text,
 */
 
 int tool_debug_cb(CURL *handle, curl_infotype type,
-                  unsigned char *data, size_t size,
+                  char *data, size_t size,
                   void *userdata)
 {
   struct OperationConfig *operation = userdata;
@@ -209,7 +209,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
     break;
   }
 
-  dump(timebuf, text, output, data, size, config->tracetype, type);
+  dump(timebuf, text, output, (unsigned char *) data, size, config->tracetype,
+       type);
   return 0;
 }
 
index 7ac15cf9bef8bb9e80ab8b4df460faf758fa256f..c1cbc807389f97daeeff9478ed0c689eddec7f08 100644 (file)
@@ -28,7 +28,7 @@
 */
 
 int tool_debug_cb(CURL *handle, curl_infotype type,
-                  unsigned char *data, size_t size,
+                  char *data, size_t size,
                   void *userdata);
 
 #endif /* HEADER_CURL_TOOL_CB_DBG_H */