Permalink
Browse files

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
  • Loading branch information...
hannob authored and bagder committed Mar 29, 2017
1 parent 396f342 commit aced311d189a70c7d9b2d958739bcfc1231b3698
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/tool_cb_hdr.c
  2. +1 −1 src/tool_cb_hdr.h
  3. +1 −1 src/tool_cb_wrt.c
  4. +1 −1 src/tool_cb_wrt.h
View
@@ -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;
View
@@ -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 */
View
@@ -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;
View
@@ -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);

0 comments on commit aced311

Please sign in to comment.