commit 89f8476110c7bdfb70528da79be328ba0f6490be
Author: planet36 <[email protected]>
AuthorDate: Fri Mar 5 14:28:15 2021 -0500
Commit: drkhsh <[email protected]>
CommitDate: Mon Dec 19 02:44:21 2022 +0100
disk: Cast fsblkcnt_t to double instead of float
Signed-off-by: drkhsh <[email protected]>
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 *