From: Nithurshen <nithurshen.dev@gmail.com>
To: linux-erofs@lists.ozlabs.org
Cc: xiang@kernel.org, hsiangkao@linux.alibaba.com,
Nithurshen <nithurshen.dev@gmail.com>
Subject: [PATCH v2 1/2] erofs-utils: dump: remove redundant conditional branch in filesize distribution
Date: Mon, 16 Mar 2026 16:22:39 +0530 [thread overview]
Message-ID: <20260316105242.6894-2-nithurshen.dev@gmail.com> (raw)
In-Reply-To: <20260316105242.6894-1-nithurshen.dev@gmail.com>
The logic for printing the filesize distribution chart in dump.erofs
contained an else if (i <= 6) branch that executed the exact same
sprintf statement as the fallback else branch.
Remove the redundant else if condition to clean up the code and
simplify the logic.
Signed-off-by: Nithurshen <nithurshen.dev@gmail.com>
---
dump/main.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/dump/main.c b/dump/main.c
index 567cff6..78c50d5 100644
--- a/dump/main.c
+++ b/dump/main.c
@@ -522,10 +522,7 @@ static void erofsdump_filesize_distribution(const char *title,
memset(col4, 0, sizeof(col4));
if (i == len - 1)
sprintf(col1, "%6d ..", lowerbound);
- else if (i <= 6)
- sprintf(col1, "%6d .. %-6d", lowerbound, upperbound);
else
-
sprintf(col1, "%6d .. %-6d", lowerbound, upperbound);
col2 = file_counts[i];
if (stats.file_category_stat[EROFS_FT_REG_FILE])
--
2.51.0
next prev parent reply other threads:[~2026-03-16 10:52 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-06 8:57 [PATCH 0/2] erofs-utils: minor cleanups and enhancements Nithurshen
2026-03-06 8:57 ` [PATCH 1/2] erofs-utils: dump: remove redundant conditional branch in filesize distribution Nithurshen
2026-03-06 8:57 ` [PATCH 2/2] erofs-utils: fsck: add warning for unsupported file types during extraction Nithurshen
2026-03-16 10:05 ` [PATCH 0/2] erofs-utils: minor cleanups and enhancements Gao Xiang
2026-03-16 10:52 ` [PATCH v2 " Nithurshen
2026-03-16 10:52 ` Nithurshen [this message]
2026-03-16 10:52 ` [PATCH v2] erofs-utils: mkfs: add --exclude-path-from and --exclude-regex-from Nithurshen
2026-03-16 10:52 ` [PATCH v2] mkfs: support block map for blob devices Nithurshen
2026-03-16 10:52 ` [PATCH v2 2/2] erofs-utils: fsck: add warning for unsupported file types during extraction Nithurshen
2026-03-16 10:59 ` [PATCH v3 0/2] erofs-utils: minor cleanups and enhancements Nithurshen
2026-03-16 10:59 ` [PATCH v3 1/2] erofs-utils: dump: remove redundant conditional branch in filesize distribution Nithurshen
2026-03-16 10:59 ` [PATCH v3 2/2] erofs-utils: fsck: add warning for unsupported file types during extraction Nithurshen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260316105242.6894-2-nithurshen.dev@gmail.com \
--to=nithurshen.dev@gmail.com \
--cc=hsiangkao@linux.alibaba.com \
--cc=linux-erofs@lists.ozlabs.org \
--cc=xiang@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox