From: Fawad Mirza <37993847+FawadMirza32@users.noreply.github.com> Date: Wed, 9 Jun 2021 11:17:38 +0000 (+0530) Subject: CURLOPT_WRITEFUNCTION.3: minor update of the example X-Git-Tag: curl-7_78_0~174 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=92c588f04b2da0e6e96d5b9640e83a8efc4bf281;p=thirdparty%2Fcurl.git CURLOPT_WRITEFUNCTION.3: minor update of the example Safely avoid chunk.size garbage value if declared non globally. Closes #7219 --- diff --git a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 index 6fe0d511f4..672160b54f 100644 --- a/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 +++ b/docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3 @@ -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);