readahead: fix calculation of percentage

This commit is contained in:
Lennart Poettering 2012-07-03 21:22:08 +02:00
parent 2d938ac75d
commit 047e111bdd

View file

@ -115,7 +115,7 @@ int main_analyze(const char *pack_path) {
tsize += size;
printf(" %4d%% (%2d) %12ld: %s\n",
sections ? (int)(size / st.st_size * 100.0) : 100,
sections ? (int) (size * 100 / st.st_size) : 100,
sections ? sections : 1,
(unsigned long)size,
path);