diff --git a/src/hddtemp.c b/src/hddtemp.c
index b4a50ac77f9ac7790db010dddae2c341ab8fb765..a9c094186516b699c7771249c29a026bbf2d2891 100644 (file)
--- a/src/hddtemp.c
+++ b/src/hddtemp.c
{
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);
strcpy (vl.host, hostname_g);
strcpy (vl.plugin, "hddtemp");
strcpy (vl.type, "temperature");
- strncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
+ sstrncpy (vl.type_instance, type_instance, sizeof (vl.type_instance));
plugin_dispatch_values (&vl);
}