summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7686105)
raw | patch | inline | side by side (parent: 7686105)
author | Ruben Kerkhof <ruben@rubenkerkhof.com> | |
Thu, 10 Dec 2015 18:38:04 +0000 (19:38 +0100) | ||
committer | Florian Forster <octo@collectd.org> | |
Fri, 11 Dec 2015 07:26:17 +0000 (08:26 +0100) |
Signed-off-by: Florian Forster <octo@collectd.org>
src/swap.c | patch | blob | history |
diff --git a/src/swap.c b/src/swap.c
index fb50cf38bae32639361d3e4d1ae1aaa4a0348452..8d8f7525d1d3ced55c6ff1b8539043ab29223f72 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
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);
}