Explorar o código

Fix disk_perc by casting it to int

Aaron Marcher %!s(int64=7) %!d(string=hai) anos
pai
achega
dcffaeaf57
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  1. 2 2
      components/disk.c

+ 2 - 2
components/disk.c

@@ -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 *