From 89f8476110c7bdfb70528da79be328ba0f6490be Mon Sep 17 00:00:00 2001 From: planet36 Date: Fri, 5 Mar 2021 14:28:15 -0500 Subject: [PATCH] disk: Cast fsblkcnt_t to double instead of float Signed-off-by: drkhsh --- components/disk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/disk.c b/components/disk.c index 0d1c13e..e19a693 100644 --- a/components/disk.c +++ b/components/disk.c @@ -29,7 +29,7 @@ disk_perc(const char *path) } return bprintf("%d", (int)(100 * - (1.0f - ((float)fs.f_bavail / (float)fs.f_blocks)))); + (1 - ((double)fs.f_bavail / (double)fs.f_blocks)))); } const char *