Fix disk_perc by casting it to int
Aaron Marcher me@drkhsh.at
Mon, 07 May 2018 12:14:46 +0200
1 files changed,
2 insertions(+),
2 deletions(-)
jump to
M
components/disk.c
→
components/disk.c
@@ -30,8 +30,8 @@ fprintf(stderr, "statvfs '%s': %s\n", mnt, strerror(errno));
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 *