Xinqi Bao's Git

Add the percent sign to *_perc functions
[slstatus.git] / components / swap.c
index 73d24df..64feceb 100644 (file)
@@ -76,7 +76,7 @@
                }
                sscanf(match, "SwapFree: %ld kB\n", &free);
 
-               return bprintf("%d", 100 * (total - free - cached) / total);
+               return bprintf("%d%%", 100 * (total - free - cached) / total);
        }
 
        const char *
 
                getstats(&total, &used);
 
-               return bprintf("%d", 100 * used / total);
+               return bprintf("%d%%", 100 * used / total);
        }
 
        const char *