]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
docs: add missing return statement in examples
authorPavel Kropachev <pkropachev@outlook.com>
Fri, 11 Apr 2025 10:57:14 +0000 (13:57 +0300)
committerDaniel Stenberg <daniel@haxx.se>
Fri, 11 Apr 2025 12:41:28 +0000 (14:41 +0200)
Closes #17024

docs/libcurl/opts/CURLMOPT_TIMERDATA.md
docs/libcurl/opts/CURLMOPT_TIMERFUNCTION.md

index 06fd430614d9bd9e9725415cd199dd2b677ab6a4..69cd4e215d7c26aa741b985c43598745247f3773 100644 (file)
@@ -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)
index 2a09a0aef090b44cae92e86b8467aa12955d0b09..a4ecf622d7bed351517ecc955ecc496846ce1a1f 100644 (file)
@@ -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)