From 2e2550026ea045b9a0492487b016ca6be87c81cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Pierre=20Andr=C3=A9?= Date: Sat, 9 Feb 2013 12:08:58 +0100 Subject: [PATCH] Avoided displaying in non-verbose mode information which is not computed The summary of 'runcount.runs' and 'runcount.fragments' was displayed in non-verbose mode. However these variables are not updated in non-verbose mode, so they would always be 0. We now only display this summary in verbose mode. --- ntfsprogs/ntfsinfo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ntfsprogs/ntfsinfo.c b/ntfsprogs/ntfsinfo.c index bbc6b414..9acebd6a 100644 --- a/ntfsprogs/ntfsinfo.c +++ b/ntfsprogs/ntfsinfo.c @@ -2302,8 +2302,10 @@ static void ntfs_dump_file_attributes(ntfs_inode *inode) "enumerating attributes"); } else { printf("End of inode reached\n"); - printf("Total runs: %lu (fragments: %lu)\n", - runcount.runs, runcount.fragments); + if (opts.verbose) { + printf("Total runs: %lu (fragments: %lu)\n", + runcount.runs, runcount.fragments); + } } /* close all data-structures we used */