summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHanno Böck <hanno@hboeck.de>2017-03-29 10:02:34 +0200
committerDaniel Stenberg <daniel@haxx.se>2017-03-29 10:05:12 +0200
commitaced311d189a70c7d9b2d958739bcfc1231b3698 (patch)
tree0748b6dd8abf037fa99f4a8ad1c0d214b0bc396f /src
parent396f34250deeca97be9d065750a5b4c70b4abd2c (diff)
downloadcurl-aced311d189a70c7d9b2d958739bcfc1231b3698.tar.gz
curl: fix callback argument inconsistency
As you can see the callback definition uses a char* for the first argument, while the function uses a void*. URL: https://curl.haxx.se/mail/lib-2017-03/0116.html
Diffstat (limited to 'src')
-rw-r--r--src/tool_cb_hdr.c2
-rw-r--r--src/tool_cb_hdr.h2
-rw-r--r--src/tool_cb_wrt.c2
-rw-r--r--src/tool_cb_wrt.h2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/tool_cb_hdr.c b/src/tool_cb_hdr.c
index 5de973470..6e23d1da8 100644
--- a/src/tool_cb_hdr.c
+++ b/src/tool_cb_hdr.c
@@ -40,7 +40,7 @@ static char *parse_filename(const char *ptr, size_t len);
** callback for CURLOPT_HEADERFUNCTION
*/
-size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata)
+size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata)
{
struct HdrCbData *hdrcbdata = userdata;
struct OutStruct *outs = hdrcbdata->outs;
diff --git a/src/tool_cb_hdr.h b/src/tool_cb_hdr.h
index bb54bbb88..32032e980 100644
--- a/src/tool_cb_hdr.h
+++ b/src/tool_cb_hdr.h
@@ -48,7 +48,7 @@ struct HdrCbData {
** callback for CURLOPT_HEADERFUNCTION
*/
-size_t tool_header_cb(void *ptr, size_t size, size_t nmemb, void *userdata);
+size_t tool_header_cb(char *ptr, size_t size, size_t nmemb, void *userdata);
#endif /* HEADER_CURL_TOOL_CB_HDR_H */
diff --git a/src/tool_cb_wrt.c b/src/tool_cb_wrt.c
index 041345762..5c28a2cf8 100644
--- a/src/tool_cb_wrt.c
+++ b/src/tool_cb_wrt.c
@@ -72,7 +72,7 @@ bool tool_create_output_file(struct OutStruct *outs)
** callback for CURLOPT_WRITEFUNCTION
*/
-size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata)
+size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
{
size_t rc;
struct OutStruct *outs = userdata;
diff --git a/src/tool_cb_wrt.h b/src/tool_cb_wrt.h
index fc60be0fc..4ccbf3a5f 100644
--- a/src/tool_cb_wrt.h
+++ b/src/tool_cb_wrt.h
@@ -27,7 +27,7 @@
** callback for CURLOPT_WRITEFUNCTION
*/
-size_t tool_write_cb(void *buffer, size_t sz, size_t nmemb, void *userdata);
+size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata);
/* create a local file for writing, return TRUE on success */
bool tool_create_output_file(struct OutStruct *outs);