X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Firq.c;h=986efafbb8e77a5d19debbfa0b634cbec230ffdc;hb=6597f3a6584704f92f824f3cf7bac3369102e8a0;hp=a8866b744a18c3ee3f77aed7bd61a1edc9035620;hpb=2354eda94fa44c8bcb8e39b24b117e7937110224;p=collectd.git diff --git a/src/irq.c b/src/irq.c index a8866b74..986efafb 100644 --- a/src/irq.c +++ b/src/irq.c @@ -131,12 +131,11 @@ static void irq_submit (unsigned int irq, counter_t value) vl.values = values; vl.values_len = 1; - vl.time = time (NULL); - strcpy (vl.host, hostname_g); - strcpy (vl.plugin, "irq"); - strcpy (vl.type, "irq"); + sstrncpy (vl.host, hostname_g, sizeof (vl.host)); + sstrncpy (vl.plugin, "irq", sizeof (vl.plugin)); + sstrncpy (vl.type, "irq", sizeof (vl.type)); - status = snprintf (vl.type_instance, sizeof (vl.type_instance), + status = ssnprintf (vl.type_instance, sizeof (vl.type_instance), "%u", irq); if ((status < 1) || ((unsigned int)status >= sizeof (vl.type_instance))) return;