From 047e111bdddfed52dabc7ff8242c2eec78e126fb Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 3 Jul 2012 21:22:08 +0200 Subject: readahead: fix calculation of percentage --- src/readahead/readahead-analyze.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c index 8f1d7f9c4f..53892b0cf8 100644 --- a/src/readahead/readahead-analyze.c +++ b/src/readahead/readahead-analyze.c @@ -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); -- cgit v1.2.3-54-g00ecf