return (status);
interfaces_num++;
- INFO("ethstat plugin: Registred interface %s",
+ INFO("ethstat plugin: Registered interface %s",
interfaces[interfaces_num - 1]);
return (0);
return (ENOMEM);
}
- map = malloc (sizeof (*map));
+ map = calloc (1, sizeof (*map));
if (map == NULL)
{
sfree (key);
- ERROR ("ethstat plugin: malloc(3) failed.");
+ ERROR ("ethstat plugin: calloc failed.");
return (ENOMEM);
}
- memset (map, 0, sizeof (*map));
sstrncpy (map->type, ci->values[1].value.string, sizeof (map->type));
if (ci->values_num == 3)
close (fd);
sfree (strings);
sfree (stats);
- ERROR("ethstat plugin: malloc(3) failed.");
+ ERROR("ethstat plugin: malloc failed.");
return (-1);
}