From: Pavel Kropachev Date: Fri, 11 Apr 2025 10:57:14 +0000 (+0300) Subject: docs: add missing return statement in examples X-Git-Tag: curl-8_14_0~320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d9a86b672930d91aabc3cff2b4f26e7518152fa9;p=thirdparty%2Fcurl.git docs: add missing return statement in examples Closes #17024 --- diff --git a/docs/libcurl/opts/CURLMOPT_TIMERDATA.md b/docs/libcurl/opts/CURLMOPT_TIMERDATA.md index 06fd430614..69cd4e215d 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERDATA.md +++ b/docs/libcurl/opts/CURLMOPT_TIMERDATA.md @@ -47,15 +47,16 @@ struct priv { static int timerfunc(CURLM *multi, long timeout_ms, void *clientp) { - struct priv *mydata = clientp; - printf("our ptr: %p\n", mydata->custom); - - if(timeout_ms) { - /* this is the new single timeout to wait for */ - } - else { - /* delete the timeout, nothing to wait for now */ - } + struct priv *mydata = clientp; + printf("our ptr: %p\n", mydata->custom); + + if(timeout_ms) { + /* this is the new single timeout to wait for */ + } + else { + /* delete the timeout, nothing to wait for now */ + } + return 0; } int main(void) diff --git a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md index 2a09a0aef0..a4ecf622d7 100644 --- a/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md +++ b/docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md @@ -88,6 +88,7 @@ static int timerfunc(CURLM *multi, long timeout_ms, void *clientp) else { /* delete the timeout, nothing to wait for now */ } + return 0; } int main(void)