summaryrefslogtreecommitdiff
path: root/components/ram.c
diff options
context:
space:
mode:
authorAaron Marcher <me@drkhsh.at>2018-05-19 20:33:06 +0200
committerAaron Marcher <me@drkhsh.at>2018-05-19 20:33:06 +0200
commit74c4f4ebdae8a12fc95840954dde574692234b01 (patch)
tree01b98fbca2665bffd74a65daf67c658ca21217bb /components/ram.c
parent68a3902dc533a66c1377409b34904f730ae4a7ef (diff)
Add the percent sign to *_perc functions
Units should be added to the corresponding numbers
Diffstat (limited to 'components/ram.c')
-rw-r--r--components/ram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/ram.c b/components/ram.c
index 8f96b04..0eb2ea9 100644
--- a/components/ram.c
+++ b/components/ram.c
@@ -28,7 +28,7 @@
"MemAvailable: %ld kB\nBuffers: %ld kB\n"
"Cached: %ld kB\n",
&total, &free, &buffers, &buffers, &cached) == 5) ?
- bprintf("%d", 100 * ((total - free) - (buffers + cached)) /
+ bprintf("%d%%", 100 * ((total - free) - (buffers + cached)) /
total) :
NULL;
}
@@ -97,7 +97,7 @@
if (load_uvmexp(&uvmexp)) {
percent = uvmexp.active * 100 / uvmexp.npages;
- return bprintf("%d", percent);
+ return bprintf("%d%%", percent);
}
return NULL;