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]
Message-Id: <1300190318-23164-1-git-send-email-lczerner@redhat.com>
Date:	Tue, 15 Mar 2011 12:58:38 +0100
From:	Lukas Czerner <lczerner@...hat.com>
To:	linux-ext4@...r.kernel.org
Cc:	tytso@....edu, Lukas Czerner <lczerner@...hat.com>
Subject: [PATCH] e2fsprogs: remove leftover retval check

Remove leftover retval check from the read_bitmaps(). It is not
necessary as it is not previously set by any function, moreover the
retval value is not initialized in definition which may cause errors
when garbage data appears in it.

Also initialize retval to zero in definition.

Signed-off-by: Lukas Czerner <lczerner@...hat.com>
---
 lib/ext2fs/rw_bitmaps.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/lib/ext2fs/rw_bitmaps.c b/lib/ext2fs/rw_bitmaps.c
index d6f35fd..086d4b7 100644
--- a/lib/ext2fs/rw_bitmaps.c
+++ b/lib/ext2fs/rw_bitmaps.c
@@ -33,7 +33,7 @@ static errcode_t write_bitmaps(ext2_filsys fs, int do_inode, int do_block)
 	unsigned int	j;
 	int		block_nbytes, inode_nbytes;
 	unsigned int	nbits;
-	errcode_t	retval;
+	errcode_t	retval = 0;
 	char 		*block_buf, *inode_buf;
 	int		csum_flag = 0;
 	blk64_t		blk;
@@ -159,8 +159,6 @@ static errcode_t read_bitmaps(ext2_filsys fs, int do_inode, int do_block)
 				       EXT4_FEATURE_RO_COMPAT_GDT_CSUM))
 		csum_flag = 1;
 
-	if (retval)
-		return retval;
 	if (do_block) {
 		if (fs->block_map)
 			ext2fs_free_block_bitmap(fs->block_map);
-- 
1.7.4

--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ