X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=645dc586023523ae7af55722da4f20e3ca416442;hb=5afde1077e3c8fc119b79caa2572cbf84dbfe5ca;hp=d714b5fcdb8d7e558eb02d1c7a787b506bc07230;hpb=01e2d29ebc5dec07daab935da3fcee5bb9c7d620;p=collectd.git diff --git a/src/swap.c b/src/swap.c index d714b5fc..645dc586 100644 --- a/src/swap.c +++ b/src/swap.c @@ -761,14 +761,13 @@ static int swap_read (void) /* {{{ */ #elif HAVE_PERFSTAT static int swap_read (void) /* {{{ */ { - perfstat_memory_total_t pmemory; + perfstat_memory_total_t pmemory = { 0 }; int status; gauge_t total; gauge_t free; gauge_t reserved; - memset (&pmemory, 0, sizeof (pmemory)); status = perfstat_memory_total (NULL, &pmemory, sizeof(perfstat_memory_total_t), 1); if (status < 0) {