From 74c4f4ebdae8a12fc95840954dde574692234b01 Mon Sep 17 00:00:00 2001 From: Aaron Marcher Date: Sat, 19 May 2018 20:33:06 +0200 Subject: Add the percent sign to *_perc functions Units should be added to the corresponding numbers --- components/swap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'components/swap.c') diff --git a/components/swap.c b/components/swap.c index 73d24df..64feceb 100644 --- a/components/swap.c +++ b/components/swap.c @@ -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 * @@ -184,7 +184,7 @@ getstats(&total, &used); - return bprintf("%d", 100 * used / total); + return bprintf("%d%%", 100 * used / total); } const char * -- cgit v1.2.3