X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Firq.c;h=986efafbb8e77a5d19debbfa0b634cbec230ffdc;hb=bc7992ed0693313a2b1fe282a5bf23f1cc9f8e42;hp=9eb1de426b83bea8b7243f0c2e9c993de87fdb1c;hpb=53bd9256920f01cc5b835639c7e7971979ed3350;p=collectd.git diff --git a/src/irq.c b/src/irq.c index 9eb1de42..986efafb 100644 --- a/src/irq.c +++ b/src/irq.c @@ -131,16 +131,16 @@ 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"); + 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; - plugin_dispatch_values ("irq", &vl); + plugin_dispatch_values (&vl); } /* void irq_submit */ static int irq_read (void)