diff options
author | Patrick Griffis <tingping@tingping.se> | 2016-09-03 12:24:15 -0400 |
---|---|---|
committer | Patrick Griffis <tingping@tingping.se> | 2016-09-03 12:24:15 -0400 |
commit | 4658c5d4e544380280bade4c682551c1f0aee1bd (patch) | |
tree | e5d6b450e53c207b78cb486b2154ef0f12878e03 /plugins/sysinfo | |
parent | 332f2e65b9e22b53862764806d6a5933d05d2c58 (diff) |
sysinfo: Don't print swap if 0
Diffstat (limited to 'plugins/sysinfo')
-rw-r--r-- | plugins/sysinfo/unix/backend.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |