X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fcpufreq.c;h=b92b1d095226c6a9deea13fa6731d5a68b213478;hb=HEAD;hp=f4424e6556af254d556a9b902be012fc8ff5ad83;hpb=d98487a27d294e31f483b9d43e0d6c02717d248c;p=collectd.git diff --git a/src/cpufreq.c b/src/cpufreq.c index f4424e65..b92b1d09 100644 --- a/src/cpufreq.c +++ b/src/cpufreq.c @@ -67,10 +67,9 @@ static void cpufreq_submit (int cpu_num, double value) vl.values = values; vl.values_len = 1; - vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "cpufreq"); - strcpy (vl.type, "cpufreq"); + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "cpufreq", sizeof (vl.plugin)); + sstrncpy (vl.type, "cpufreq", sizeof (vl.type)); ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%i", cpu_num);