From: Robin Hsu <robinhsu@google.com>
To: linux-f2fs-devel@lists.sourceforge.net, jaegeuk@kernel.org,
chao@kernel.org
Cc: linux-kernel@vger.kernel.org, Robin Hsu <robinhsu@google.com>
Subject: [PATCH 1/1] f2fs-toos:fsck.f2fs Fix bad return value
Date: Mon, 26 Oct 2020 17:40:00 +0800 [thread overview]
Message-ID: <20201026094000.1500425-1-robinhsu@google.com> (raw)
'ret' should not have been used here: otherwise, it would be wrongly used
as the error code and then be returned from main().
Signed-off-by: Robin Hsu <robinhsu@google.com>
---
fsck/fsck.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index f97e9fb..66e4e3f 100644
--- a/fsck/fsck.c
+++ b/fsck/fsck.c
@@ -3137,8 +3137,7 @@ int fsck_verify(struct f2fs_sb_info *sbi)
char ans[255] = {0};
printf("\nDo you want to restore lost files into ./lost_found/? [Y/N] ");
- ret = scanf("%s", ans);
- ASSERT(ret >= 0);
+ ASSERT(scanf("%s", ans) >= 0);
if (!strcasecmp(ans, "y")) {
for (i = 0; i < fsck->nr_nat_entries; i++) {
if (f2fs_test_bit(i, fsck->nat_area_bitmap))
--
2.29.0.rc2.309.g374f81d7ae-goog
next reply other threads:[~2020-10-26 9:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-26 9:40 Robin Hsu [this message]
2020-10-28 6:57 ` [f2fs-dev] " Chao Yu
2020-11-02 16:09 ` Jaegeuk Kim
2020-11-03 2:52 ` Eric Biggers
2020-11-03 3:23 ` Jaegeuk Kim
[not found] ` <CAH7-xNRd1QBJUaxajijjrMbWdKKO1AKS2-1Q5HAAkHSUF628ug@mail.gmail.com>
2020-11-04 18:53 ` Jaegeuk Kim
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=20201026094000.1500425-1-robinhsu@google.com \
--to=robinhsu@google.com \
--cc=chao@kernel.org \
--cc=jaegeuk@kernel.org \
--cc=linux-f2fs-devel@lists.sourceforge.net \
--cc=linux-kernel@vger.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
Powered by JetHome