From 4658c5d4e544380280bade4c682551c1f0aee1bd Mon Sep 17 00:00:00 2001 From: Patrick Griffis Date: Sat, 3 Sep 2016 12:24:15 -0400 Subject: [PATCH] sysinfo: Don't print swap if 0 --- plugins/sysinfo/unix/backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sysinfo/unix/backend.c b/plugins/sysinfo/unix/backend.c index dc065518..9d886f09 100644 --- a/plugins/sysinfo/unix/backend.c +++ b/plugins/sysinfo/unix/backend.c @@ -67,7 +67,7 @@ char *sysinfo_backend_get_memory(void) mem_fmt = sysinfo_format_memory (mem_total, mem_free); - if (swap_fmt) + if (swap_fmt && swap_total != 0) { ret = g_strdup_printf ("Physical: %s Swap: %s", mem_fmt, swap_fmt); g_free (mem_fmt);