Xinqi Bao's Git
projects
/
slstatus.git
/ blobdiff
summary
|
log
|
commit
|
diff
|
tree
raw
|
inline
| side by side
Add the percent sign to *_perc functions
[slstatus.git]
/
components
/
swap.c
diff --git
a/components/swap.c
b/components/swap.c
index
73d24df
..
64feceb
100644
(file)
--- a/
components/swap.c
+++ b/
components/swap.c
@@
-76,7
+76,7
@@
}
sscanf(match, "SwapFree: %ld kB\n", &free);
}
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 *
}
const char *
@@
-184,7
+184,7
@@
getstats(&total, &used);
getstats(&total, &used);
- return bprintf("%d", 100 * used / total);
+ return bprintf("%d
%%
", 100 * used / total);
}
const char *
}
const char *