src/utils_complain: Changed c_release() into a macro.
[collectd.git] / src / swap.c
index 632d372..4f0a0ba 100644 (file)
 #  include <kvm.h>
 #endif
 
+#if HAVE_STATGRAB_H
+# include <statgrab.h>
+#endif
+
 #undef  MAX
 #define MAX(x,y) ((x) > (y) ? (x) : (y))
 
@@ -123,7 +127,7 @@ static void swap_submit (const char *type_instance, double value)
        strcpy (vl.host, hostname_g);
        strcpy (vl.plugin, "swap");
        strcpy (vl.type, "swap");
-       strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+       sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
 
        plugin_dispatch_values (&vl);
 } /* void swap_submit */