1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-24 17:18:48 -05:00

CURLOPT_WRITEFUNCTION.3: minor update of the example

Safely avoid chunk.size garbage value if declared non globally.

Closes #7219
This commit is contained in:
Fawad Mirza 2021-06-09 16:47:38 +05:30 committed by Daniel Stenberg
parent fdb32eef17
commit 92c588f04b
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -102,7 +102,7 @@ This will return CURLE_OK.
return realsize;
}
struct memory chunk;
struct memory chunk = {0};
/* send all data to this function */
curl_easy_setopt(curl_handle, CURLOPT_WRITEFUNCTION, cb);