]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
CURLINFO_FILETIME*.md: correct the examples
authorDaniel Stenberg <daniel@haxx.se>
Mon, 1 Sep 2025 21:38:44 +0000 (23:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 2 Sep 2025 05:51:14 +0000 (07:51 +0200)
Only -1 means bad value, all others are acceptable.

Ref: #18424
Closes #18447

docs/libcurl/opts/CURLINFO_FILETIME.md
docs/libcurl/opts/CURLINFO_FILETIME_T.md

index 2a561cc5a048b55f4afb81b1fb60068c53c897c7..9d4c414d5407d3a45da6ec7409a5420dde3a5787 100644 (file)
@@ -58,7 +58,7 @@ int main(void)
     if(CURLE_OK == res) {
       long filetime = 0;
       res = curl_easy_getinfo(curl, CURLINFO_FILETIME, &filetime);
-      if((CURLE_OK == res) && (filetime >= 0)) {
+      if((CURLE_OK == res) && (filetime != -1)) {
         time_t file_time = (time_t)filetime;
         printf("filetime: %s", ctime(&file_time));
       }
index 9b7145e78d2f433f79fa10784e4f082bf1056cc5..2d15ba88d49fdf3bcc918574d3d6148488ae9da4 100644 (file)
@@ -59,7 +59,7 @@ int main(void)
     if(CURLE_OK == res) {
       curl_off_t filetime;
       res = curl_easy_getinfo(curl, CURLINFO_FILETIME_T, &filetime);
-      if((CURLE_OK == res) && (filetime >= 0)) {
+      if((CURLE_OK == res) && (filetime != -1)) {
         time_t file_time = (time_t)filetime;
         printf("filetime: %s", ctime(&file_time));
       }