Signed-off-by: Florian Forster <octo@collectd.org>
return (0);
/* Allocate and initialize the swaptbl_t structure */
- s = (swaptbl_t *) smalloc (swap_num * sizeof (swapent_t) + sizeof (struct swaptable));
+ s = malloc (swap_num * sizeof (swapent_t) + sizeof (struct swaptable));
if (s == NULL)
{
- ERROR ("swap plugin: smalloc failed.");
+ ERROR ("swap plugin: malloc failed.");
return (-1);
}
s_paths = calloc (swap_num, PATH_MAX);
if (s_paths == NULL)
{
- ERROR ("swap plugin: malloc failed.");
+ ERROR ("swap plugin: calloc failed.");
sfree (s);
return (-1);
}