projects
/
suckless
/
slstatus.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4fc4983
)
Fix disk_perc by casting it to int
author
Aaron Marcher
<me@drkhsh.at>
Mon, 7 May 2018 10:14:46 +0000
(12:14 +0200)
committer
Aaron Marcher
<me@drkhsh.at>
Mon, 7 May 2018 10:14:46 +0000
(12:14 +0200)
components/disk.c
patch
|
blob
|
history
diff --git
a/components/disk.c
b/components/disk.c
index a225421335040ae7bdef9116ab8bb18b18020da4..1251edb64d792908157ba10da5919913d1b76e38 100644
(file)
--- a/
components/disk.c
+++ b/
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 *