From f6eb6efd7d1bae52bf3fecccf4c6f9b3476eb8fa Mon Sep 17 00:00:00 2001 From: Florian Forster Date: Thu, 9 Feb 2012 10:46:21 +0100 Subject: [PATCH] write_graphite plugin: Print the time as an unsigned int. Change-Id: I61f4952c8debdf7c80c4e1e4647cf42ecf00f033 --- src/write_graphite.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/write_graphite.c b/src/write_graphite.c index 2d61cac0..857258a6 100644 --- a/src/write_graphite.c +++ b/src/write_graphite.c @@ -439,10 +439,10 @@ static int wg_send_message (const char* key, const char* value, char message[1024]; message_len = (size_t) ssnprintf (message, sizeof (message), - "%s %s %.0f\r\n", + "%s %s %u\r\n", key, value, - CDTIME_T_TO_DOUBLE(time)); + (unsigned int) CDTIME_T_TO_TIME_T (time)); if (message_len >= sizeof (message)) { ERROR ("write_graphite plugin: message buffer too small: " "Need %zu bytes.", message_len + 1); -- 2.30.2