X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Fswap.c;h=645dc586023523ae7af55722da4f20e3ca416442;hb=5afde1077e3c8fc119b79caa2572cbf84dbfe5ca;hp=e4c5d24f23bccc918b440c06db86260c0715d44d;hpb=1fc00932fd49fa535551cc4bba09c4e4be059ab4;p=collectd.git diff --git a/src/swap.c b/src/swap.c index e4c5d24f..645dc586 100644 --- a/src/swap.c +++ b/src/swap.c @@ -82,6 +82,10 @@ static derive_t pagesize; static _Bool report_by_device = 0; /* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_TWO_ARGS */ +#elif HAVE_SWAPCTL && HAVE_SWAPCTL_THREE_ARGS +/* No global variables */ +/* #endif HAVE_SWAPCTL && HAVE_SWAPCTL_THREE_ARGS */ + #elif defined(VM_SWAPUSAGE) /* No global variables */ /* #endif defined(VM_SWAPUSAGE) */ @@ -757,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) {