Code

Unified string handling.
[collectd.git] / src / swap.c
index 632d372e1bc6e5e48acf5181691f7ddef6cb07e8..362a2a82963f573bc764bffa6c13952bdbbb9fd3 100644 (file)
@@ -123,7 +123,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 */