Code

Merge remote-tracking branch 'github/pr/387'
[collectd.git] / src / wireless.c
index a0644fe490a4bef130a9ecff552124e106a7d220..f7ba735d37687356d16d3d7bd5b3ff230736563d 100644 (file)
@@ -55,9 +55,8 @@ static void wireless_submit (const char *plugin_instance, const char *type,
 
        vl.values = values;
        vl.values_len = 1;
-       vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "wireless");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "wireless", sizeof (vl.plugin));
        sstrncpy (vl.plugin_instance, plugin_instance,
                        sizeof (vl.plugin_instance));
        sstrncpy (vl.type, type, sizeof (vl.type));