{
int port = (int) (atof (value));
if ((port > 0) && (port <= 65535))
- snprintf (hddtemp_port, sizeof (hddtemp_port),
+ ssnprintf (hddtemp_port, sizeof (hddtemp_port),
"%i", port);
else
- strncpy (hddtemp_port, value, sizeof (hddtemp_port));
- hddtemp_port[sizeof (hddtemp_port) - 1] = '\0';
+ sstrncpy (hddtemp_port, value, sizeof (hddtemp_port));
}
else if (strcasecmp (key, "TranslateDevicename") == 0)
{
if ((ret = (char *) malloc (128 * sizeof (char))) == NULL)
return (NULL);
- if (snprintf (ret, 128, "%i-%i", list->major, list->minor) >= 128)
+ if (ssnprintf (ret, 128, "%i-%i", list->major, list->minor) >= 128)
{
free (ret);
return (NULL);
vl.values = values;
vl.values_len = 1;
- vl.time = time (NULL);
- strcpy (vl.host, hostname_g);
- strcpy (vl.plugin, "hddtemp");
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.host, hostname_g, sizeof (vl.host));
+ sstrncpy (vl.plugin, "hddtemp", sizeof (vl.plugin));
+ sstrncpy (vl.type, "temperature", sizeof (vl.type));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
- plugin_dispatch_values ("temperature", &vl);
+ plugin_dispatch_values (&vl);
}
static int hddtemp_read (void)