Fix this (a pointer was compared with an integer):
[collectd.git] / src / swap.c
index b7fc7ed..0891503 100644 (file)
@@ -32,9 +32,9 @@
 # define SWAP_HAVE_READ 0
 #endif
 
-#ifdef KERNEL_SOLARIS
-#include <sys/swap.h>
-#endif /* KERNEL_SOLARIS */
+#if HAVE_SYS_SWAP_H
+# include <sys/swap.h>
+#endif
 
 #undef  MAX
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
@@ -82,8 +82,8 @@ static void swap_submit (unsigned long long swap_used,
 {
        char buffer[512];
 
-       if (snprintf (buffer, 512, "N:%llu:%llu:%llu:%llu", swap_used,
-                               swap_free, swap_cached, swap_resv) >= 512)
+       if (snprintf (buffer, 512, "%u:%llu:%llu:%llu:%llu", (unsigned int) curtime,
+                               swap_used, swap_free, swap_cached, swap_resv) >= 512)
                return;
 
        plugin_submit (MODULE_NAME, "-", buffer);