disk: Cast fsblkcnt_t to double instead of float
authorplanet36 <planet36@users.noreply.github.com>
Fri, 5 Mar 2021 19:28:15 +0000 (14:28 -0500)
committerdrkhsh <me@drkhsh.at>
Mon, 19 Dec 2022 01:44:21 +0000 (02:44 +0100)
Signed-off-by: drkhsh <me@drkhsh.at>
components/disk.c

index 0d1c13e7be80d3a3dc710fdb6541099877c94e33..e19a6935508464815694a1662a511b1560e98ed6 100644 (file)
@@ -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 *