From d9a86b672930d91aabc3cff2b4f26e7518152fa9 Mon Sep 17 00:00:00 2001 From: Pavel Kropachev Date: Fri, 11 Apr 2025 13:57:14 +0300 Subject: [PATCH] docs: add missing return statement in examples Closes #17024 --- docs/libcurl/opts/CURLMOPT_TIMERDATA.md | 19 ++++++++++--------- docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md | 1 + 2 files changed, 11 insertions(+), 9 deletions(-) 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) -- 2.47.3