]> jfr.im git - irc/hexchat/hexchat.git/commitdiff
sysinfo: Don't print swap if 0
authorPatrick Griffis <redacted>
Sat, 3 Sep 2016 16:24:15 +0000 (12:24 -0400)
committerPatrick Griffis <redacted>
Sat, 3 Sep 2016 16:24:15 +0000 (12:24 -0400)
plugins/sysinfo/unix/backend.c

index dc065518734c0c44a9fd90db44036063007e396a..9d886f09e89ed16633f08a7fed1009cbed6a583c 100644 (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);