lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 26 Oct 2020 17:40:00 +0800
From:   Robin Hsu <robinhsu@...gle.com>
To:     linux-f2fs-devel@...ts.sourceforge.net, jaegeuk@...nel.org,
        chao@...nel.org
Cc:     linux-kernel@...r.kernel.org, Robin Hsu <robinhsu@...gle.com>
Subject: [PATCH 1/1] f2fs-toos:fsck.f2fs Fix bad return value

'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@...gle.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ