1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-05 17:15:04 -05:00

writeout_json: use curl_off_t printf() option for the time output

Follow-up to: 04c03416e6

Closes #5115
This commit is contained in:
Daniel Stenberg 2020-03-17 23:29:10 +01:00
parent daf1eee11e
commit 8d9802b0ae
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -84,7 +84,8 @@ static int writeTime(FILE *str, CURL *curl, const char *key, CURLINFO ci)
if(CURLE_OK == curl_easy_getinfo(curl, ci, &val)) {
curl_off_t s = val / 1000000l;
curl_off_t ms = val % 1000000l;
fprintf(str, "\"%s\":%ld.%06ld", key, s, ms);
fprintf(str, "\"%s\":%" CURL_FORMAT_CURL_OFF_T
".%06" CURL_FORMAT_CURL_OFF_T, key, s, ms);
return 1;
}
return 0;