mirror of
https://github.com/curl/curl.git
synced 2026-04-14 22:01:41 +03: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
2 changed files with 2 additions and 2 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue