diff options
author | Aaron Marcher <me@drkhsh.at> | 2018-05-19 20:33:06 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2018-05-19 20:33:06 +0200 |
commit | 74c4f4ebdae8a12fc95840954dde574692234b01 (patch) | |
tree | 01b98fbca2665bffd74a65daf67c658ca21217bb /components/swap.c | |
parent | 68a3902dc533a66c1377409b34904f730ae4a7ef (diff) |
Add the percent sign to *_perc functions
Units should be added to the corresponding numbers
Diffstat (limited to 'components/swap.c')
-rw-r--r-- | components/swap.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 * |