Code

Merge remote-tracking branch 'github/pr/387'
[collectd.git] / src / entropy.c
index 5f9eb530caf33bf95e364199312f310d2e0fe8d8..d56be6dc1df8f4645eb7c4f04a820ee978d87a8b 100644 (file)
@@ -38,13 +38,11 @@ static void entropy_submit (double entropy)
 
        vl.values = values;
        vl.values_len = 1;
-       vl.time = time (NULL);
-       strcpy (vl.host, hostname_g);
-       strcpy (vl.plugin, "entropy");
-       strcpy (vl.plugin_instance, "");
-       strcpy (vl.type_instance, "");
+       sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+       sstrncpy (vl.plugin, "entropy", sizeof (vl.plugin));
+       sstrncpy (vl.type, "entropy", sizeof (vl.type));
 
-       plugin_dispatch_values ("entropy", &vl);
+       plugin_dispatch_values (&vl);
 }
 
 static int entropy_read (void)