modbus plugin: Fix a small memory leak in mb_config_add_datagroup().
[collectd.git] / src / xmms.c
index 01c7e0c..52beb65 100644 (file)
@@ -36,9 +36,8 @@ static void cxmms_submit (const char *type, gauge_t value)
 
        vl.values = values;
        vl.values_len = 1;
-       vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "xmms");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "xmms", sizeof (vl.plugin));
        sstrncpy (vl.type, type, sizeof (vl.type));
 
        plugin_dispatch_values (&vl);