Gitweb:
http://git.fedorahosted.org/git/?p=gfs2-utils.git;a=commitdiff;h=c883c0ce...
Commit: c883c0cef51b116fb6c20bfdfe39542a37e45d5a
Parent: 5f329b5b8a35ca56fe70cb4fc067e4aff34b1b94
Author: Andrew Price <anprice(a)redhat.com>
AuthorDate: Mon Oct 6 13:41:17 2014 +0100
Committer: Andrew Price <anprice(a)redhat.com>
CommitterDate: Wed Apr 1 16:51:34 2015 +0100
fsck.gfs2: Remove dead code from scan_inode_list
Spotted by coverity: At condition "ii = (struct inode_info *)tmp", the
value of "ii" cannot be "NULL".
In other words, tmp cannot be NULL here because the loop would have
ended in that case. Remove the NULL check and the overly excited error
message.
Signed-off-by: Andrew Price <anprice(a)redhat.com>
---
gfs2/fsck/pass4.c | 5 +----
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/gfs2/fsck/pass4.c b/gfs2/fsck/pass4.c
index f0c13fc..324ea9f 100644
--- a/gfs2/fsck/pass4.c
+++ b/gfs2/fsck/pass4.c
@@ -58,10 +58,7 @@ static int scan_inode_list(struct gfs2_sbd *sdp) {
if (lf_dip && lf_as.as_blocks == 0)
astate_save(lf_dip, &lf_as);
next = osi_next(tmp);
- if (!(ii = (struct inode_info *)tmp)) {
- log_crit( _("osi_tree broken in scan_info_list!!\n"));
- exit(FSCK_ERROR);
- }
+ ii = (struct inode_info *)tmp;
/* Don't check reference counts on the special gfs files */
if (sdp->gfs1 &&
((ii->di_num.no_addr == sdp->md.riinode->i_di.di_num.no_addr) ||