[collectd] [PATCH] exec plugin: Fixed incorrect typecast of 64-bit timestamp to unsigned int (collectd-5.0)

Alexander Kovalenko alexanderk23 at gmail.com
Sat Aug 27 20:20:22 CEST 2011


Signed-off-by: Alexander Kovalenko <alexanderk23 at gmail.com>
---
 src/exec.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/exec.c b/src/exec.c
index 0d33b29..8387204 100644
--- a/src/exec.c
+++ b/src/exec.c
@@ -729,8 +729,8 @@ static void *exec_notification_one (void *arg) /* {{{ */
 
   fprintf (fh,
       "Severity: %s\n"
-      "Time: %u\n",
-      severity, (unsigned int) n->time);
+      "Time: %lu\n",
+      severity, CDTIME_T_TO_TIME_T(n->time));
 
   /* Print the optional fields */
   if (strlen (n->host) > 0)
-- 
1.7.4.4




More information about the collectd mailing list