From: Daniel Stenberg Date: Mon, 1 Sep 2025 21:38:44 +0000 (+0200) Subject: CURLINFO_FILETIME*.md: correct the examples X-Git-Tag: curl-8_16_0~50 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e00cb001c69b1cc2f4a1035445860685bd904ec4;p=thirdparty%2Fcurl.git CURLINFO_FILETIME*.md: correct the examples Only -1 means bad value, all others are acceptable. Ref: #18424 Closes #18447 --- diff --git a/docs/libcurl/opts/CURLINFO_FILETIME.md b/docs/libcurl/opts/CURLINFO_FILETIME.md index 2a561cc5a0..9d4c414d54 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME.md +++ b/docs/libcurl/opts/CURLINFO_FILETIME.md @@ -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)); } diff --git a/docs/libcurl/opts/CURLINFO_FILETIME_T.md b/docs/libcurl/opts/CURLINFO_FILETIME_T.md index 9b7145e78d..2d15ba88d4 100644 --- a/docs/libcurl/opts/CURLINFO_FILETIME_T.md +++ b/docs/libcurl/opts/CURLINFO_FILETIME_T.md @@ -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)); }