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 | b344327c71dd1ec8b1b386dcc06a00e424c65bed (patch) | |
tree | 01b98fbca2665bffd74a65daf67c658ca21217bb /components/swap.c | |
parent | 763e115afd6eefd41f0259787d188ee0aedef063 (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 * |