diff --git a/src/swap.c b/src/swap.c
index d714b5fcdb8d7e558eb02d1c7a787b506bc07230..645dc586023523ae7af55722da4f20e3ca416442 100644 (file)
--- a/src/swap.c
+++ b/src/swap.c
#elif HAVE_PERFSTAT
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;
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)
{
status = perfstat_memory_total (NULL, &pmemory, sizeof(perfstat_memory_total_t), 1);
if (status < 0)
{