mirror of
https://github.com/curl/curl.git
synced 2026-04-11 12:01:42 +08:00
CURLINFO_FILETIME*.md: correct the examples
Only -1 means bad value, all others are acceptable. Ref: #18424 Closes #18447
This commit is contained in:
parent
9598ccee59
commit
e00cb001c6
@ -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));
|
||||
}
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user