[hackers] [slstatus] Fix disk_perc by casting it to int || Aaron Marcher
commit dcffaeaf570e6dde5745080e533b5404ebc0e610
Author: Aaron Marcher <me_AT_drkhsh.at>
AuthorDate: Mon May 7 12:14:46 2018 +0200
Commit: Aaron Marcher <me_AT_drkhsh.at>
CommitDate: Mon May 7 12:14:46 2018 +0200
Fix disk_perc by casting it to int
diff --git a/components/disk.c b/components/disk.c
index a225421..1251edb 100644
--- a/components/disk.c
+++ b/components/disk.c
_AT_@ -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 *
Received on Mon May 07 2018 - 12:15:13 CEST
This archive was generated by hypermail 2.3.0
: Mon May 07 2018 - 12:24:30 CEST