X-Git-Url: https://git.xinqibao.xyz/slstatus.git/blobdiff_plain/68a3902dc533a66c1377409b34904f730ae4a7ef..74c4f4ebdae8a12fc95840954dde574692234b01:/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 *