X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Freadahead%2Freadahead-analyze.c;h=11b2b2dc11819e385a9f323433c4ffb5015d82ec;hp=fb50ad371e8da1d2b7fba01a9e0a9eb505d2930a;hb=64825d3c589cd8742887f30acde8c57eceac2001;hpb=3b0810c53c6adfa2f436540369b8969ae75d7fcf diff --git a/src/readahead/readahead-analyze.c b/src/readahead/readahead-analyze.c index fb50ad371..11b2b2dc1 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); @@ -135,15 +135,14 @@ int main_analyze(const char *pack_path) { printf("\nHOST: %s" "TYPE: %c\n" "MISSING: %d\n" - "TOTAL: %ld\n", + "TOTAL: %llu\n", line, a, missing, - tsize); + (unsigned long long) tsize); return EXIT_SUCCESS; - fail: fclose(pack); return EXIT_FAILURE;