sysinfo: Don't print swap if 0

This commit is contained in:
Patrick Griffis 2016-09-03 12:24:15 -04:00
parent 332f2e65b9
commit 4658c5d4e5
1 changed files with 1 additions and 1 deletions

View File

@ -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);