mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-19 12:10:19 +00:00
sysinfo: Don't print swap if 0
This commit is contained in:
@@ -67,7 +67,7 @@ char *sysinfo_backend_get_memory(void)
|
|||||||
|
|
||||||
mem_fmt = sysinfo_format_memory (mem_total, mem_free);
|
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);
|
ret = g_strdup_printf ("Physical: %s Swap: %s", mem_fmt, swap_fmt);
|
||||||
g_free (mem_fmt);
|
g_free (mem_fmt);
|
||||||
|
|||||||
Reference in New Issue
Block a user