Patchwork [2/2] libext2fs: remove useless code in ext2fs_super_and_bgd_loc2

login
register
mail settings
Submitter Yongqiang Yang
Date Nov. 16, 2011, 1:02 a.m.
Message ID <1321405328-5298-2-git-send-email-xiaoqiangnk@gmail.com>
Download mbox | patch
Permalink /patch/125920/
State Rejected
Headers show

Comments

Yongqiang Yang - Nov. 16, 2011, 1:02 a.m.
Code below is useless because has_super is either 0 or 1.

if (has_super)
	has_super = 1;

Signed-off-by: Yongqiang Yang <xiaoqiangnk@gmail.com>
---
 lib/ext2fs/closefs.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

Patch

diff --git a/lib/ext2fs/closefs.c b/lib/ext2fs/closefs.c
index 973c2a2..54a24f8 100644
--- a/lib/ext2fs/closefs.c
+++ b/lib/ext2fs/closefs.c
@@ -102,8 +102,6 @@  errcode_t ext2fs_super_and_bgd_loc2(ext2_filsys fs,
 		if (((group % meta_bg_size) == 0) ||
 		    ((group % meta_bg_size) == 1) ||
 		    ((group % meta_bg_size) == (meta_bg_size-1))) {
-			if (has_super)
-				has_super = 1;
 			new_desc_blk = group_block + has_super;
 			numblocks++;
 		}