sysinfo: Don't print swap if 0
This commit is contained in:
parent
332f2e65b9
commit
4658c5d4e5
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue