From: elene-margalit Date: Thu, 27 Aug 2020 21:33:33 +0000 (+0200) Subject: Fix argument in snprintf. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=34dbe0e485bf81eaa0e63ff50a1dd7101ef8823e;p=thirdparty%2Fcollectd.git Fix argument in snprintf. --- diff --git a/src/utils/format_json/format_json.c b/src/utils/format_json/format_json.c index 6ac9622b1..a679fc8e2 100644 --- a/src/utils/format_json/format_json.c +++ b/src/utils/format_json/format_json.c @@ -129,7 +129,7 @@ static int format_metric_distribution(strbuf_t buf, yajl_gen g, uint64_t bucket_counter = buckets.buckets[i].bucket_counter; char counter_char[sizeof(bucket_counter)]; - snprintf(counter_char, sizeof(bucket_counter), "%lu", bucket_counter); + snprintf(counter_char, sizeof(bucket_counter), "%" PRIu64, bucket_counter); CHECK(json_add_string(g, max_char)); CHECK(json_add_string(g, counter_char)); }