From: Florian Forster Date: Thu, 9 Feb 2012 09:46:21 +0000 (+0100) Subject: write_graphite plugin: Print the time as an unsigned int. X-Git-Tag: collectd-5.1.0~33^2~4 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=f6eb6efd7d1bae52bf3fecccf4c6f9b3476eb8fa;p=collectd.git write_graphite plugin: Print the time as an unsigned int. Change-Id: I61f4952c8debdf7c80c4e1e4647cf42ecf00f033 --- 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);