diff options
author | Olaf Hering <olaf@aepfle.de> | 2020-12-30 17:01:47 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2020-12-30 22:20:24 +0100 |
commit | f2ed79d8eec468612a29bee4f7ef286ccf255c96 (patch) | |
tree | 9f203c63add78f6a5680937f35c0369564563e0b /tests/libtest/lib508.c | |
parent | 0a5b8af777efbcbc7d2bb0aeb7ae8f34d88270d0 (diff) | |
download | curl-f2ed79d8eec468612a29bee4f7ef286ccf255c96.tar.gz |
docs/examples: adjust prototypes for CURLOPT_READFUNCTION
The type of the buffer in curl_read_callback is 'char *', not 'void *'.
Signed-off-by: Olaf Hering <olaf@aepfle.de>
Closes #6392
Diffstat (limited to 'tests/libtest/lib508.c')
-rw-r--r-- | tests/libtest/lib508.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/libtest/lib508.c b/tests/libtest/lib508.c index 424ef50d3..b5391fb8e 100644 --- a/tests/libtest/lib508.c +++ b/tests/libtest/lib508.c @@ -30,7 +30,7 @@ struct WriteThis { size_t sizeleft; }; -static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) +static size_t read_callback(char *ptr, size_t size, size_t nmemb, void *userp) { struct WriteThis *pooh = (struct WriteThis *)userp; @@ -38,7 +38,7 @@ static size_t read_callback(void *ptr, size_t size, size_t nmemb, void *userp) return 0; if(pooh->sizeleft) { - *(char *)ptr = pooh->readptr[0]; /* copy one single byte */ + *ptr = pooh->readptr[0]; /* copy one single byte */ pooh->readptr++; /* advance pointer */ pooh->sizeleft--; /* less data left */ return 1; /* we return 1 byte at a time! */ |