X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=src%2Fswap.c;h=645dc586023523ae7af55722da4f20e3ca416442;hb=3fae5596643f1e361eb18c3d65448f8bc02fdd80;hp=d714b5fcdb8d7e558eb02d1c7a787b506bc07230;hpb=0d80072344ea5322c34f716ed77a5319a62bfc96;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) {