From: Daniel Stenberg Date: Tue, 17 Mar 2020 22:29:10 +0000 (+0100) Subject: writeout_json: use curl_off_t printf() option for the time output X-Git-Tag: curl-7_70_0~216 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=8d9802b0aed12932612847f4267a42d08b7bfa71;p=thirdparty%2Fcurl.git writeout_json: use curl_off_t printf() option for the time output Follow-up to: 04c03416e68fd635a15 Closes #5115 --- diff --git a/src/tool_writeout_json.c b/src/tool_writeout_json.c index 703cbbde87..70235c2091 100644 --- a/src/tool_writeout_json.c +++ b/src/tool_writeout_json.c @@ -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;