Skip to content

Commit baaf0ba

Browse files
hannobbagder
authored andcommitted
curl: fix callback functions to match prototype
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
1 parent 244e0a3 commit baaf0ba

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

src/tool_cb_dbg.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ static void dump(const char *timebuf, const char *text,
4141
*/
4242

4343
int tool_debug_cb(CURL *handle, curl_infotype type,
44-
unsigned char *data, size_t size,
44+
char *data, size_t size,
4545
void *userdata)
4646
{
4747
struct OperationConfig *operation = userdata;
@@ -209,7 +209,8 @@ int tool_debug_cb(CURL *handle, curl_infotype type,
209209
break;
210210
}
211211

212-
dump(timebuf, text, output, data, size, config->tracetype, type);
212+
dump(timebuf, text, output, (unsigned char *) data, size, config->tracetype,
213+
type);
213214
return 0;
214215
}
215216

src/tool_cb_dbg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
*/
2929

3030
int tool_debug_cb(CURL *handle, curl_infotype type,
31-
unsigned char *data, size_t size,
31+
char *data, size_t size,
3232
void *userdata);
3333

3434
#endif /* HEADER_CURL_TOOL_CB_DBG_H */

0 commit comments

Comments
 (0)