]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLOPT_WRITEFUNCTION.3: minor update of the example
authorFawad Mirza <37993847+FawadMirza32@users.noreply.github.com>
Wed, 9 Jun 2021 11:17:38 +0000 (16:47 +0530)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 9 Jun 2021 12:29:40 +0000 (14:29 +0200)
Safely avoid chunk.size garbage value if declared non globally.

Closes #7219

docs/libcurl/opts/CURLOPT_WRITEFUNCTION.3

index 6fe0d511f4977c193d054644d3ca8a5c9394f6cc..672160b54fe9639b175fd10eb372db80a71e58eb 100644 (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);