X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=e4c5d24f23bccc918b440c06db86260c0715d44d;hb=59547eb66a3743ca0b458222d7a4318f3e659a60;hp=cfde4ea6d2bd9d194abbab16d4d2269e7347e114;hpb=f701e685eab83f37ecc6501d7dbe4eb941a454bb;p=collectd.git diff --git a/src/swap.c b/src/swap.c index cfde4ea6..e4c5d24f 100644 --- a/src/swap.c +++ b/src/swap.c @@ -521,10 +521,10 @@ static int swap_read (void) /* {{{ */ 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); } @@ -534,7 +534,7 @@ static int swap_read (void) /* {{{ */ 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); }