diff options
author | Aaron Marcher <me@drkhsh.at> | 2018-05-07 12:14:46 +0200 |
---|---|---|
committer | Aaron Marcher <me@drkhsh.at> | 2018-05-07 12:14:46 +0200 |
commit | dcffaeaf570e6dde5745080e533b5404ebc0e610 (patch) | |
tree | 85d2daf2be98b2e377405fb01e79091d2478575d | |
parent | 4fc4983502243b916acac7d61c09529ee744d759 (diff) |
Fix disk_perc by casting it to int
-rw-r--r-- | components/disk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/disk.c b/components/disk.c index a225421..1251edb 100644 --- a/components/disk.c +++ b/components/disk.c @@ -30,8 +30,8 @@ disk_perc(const char *mnt) return NULL; } - return bprintf("%d", 100 * - (1.0f - ((float)fs.f_bfree / (float)fs.f_blocks))); + return bprintf("%d", (int)(100 * + (1.0f - ((float)fs.f_bfree / (float)fs.f_blocks)))); } const char * |