GIT: unionfs2-2.6.27.y: Unionfs: remove unnecessary if condition

Erez Zadok ezk at fsl.cs.sunysb.edu
Thu Aug 12 23:17:12 EDT 2010


commit 29ac194164bba1a09118f5275d5dbdfd93f61292
Author: Erez Zadok <ezk at cs.sunysb.edu>
Date:   Sat Sep 29 01:36:57 2007 -0400

    Unionfs: remove unnecessary if condition
    
    The condition is always true there.
    
    Signed-off-by: Erez Zadok <ezk at cs.sunysb.edu>

diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c
index 200fb55..da0fcdb 100644
--- a/fs/unionfs/dirfops.c
+++ b/fs/unionfs/dirfops.c
@@ -63,12 +63,10 @@ static int unionfs_filldir(void *dirent, const char *name, int namelen,
 		off_t pos = rdstate2offset(buf->rdstate);
 		u64 unionfs_ino = ino;
 
-		if (!err) {
-			err = buf->filldir(buf->dirent, name, namelen, pos,
-					   unionfs_ino, d_type);
-			buf->rdstate->offset++;
-			verify_rdstate_offset(buf->rdstate);
-		}
+		err = buf->filldir(buf->dirent, name, namelen, pos,
+				   unionfs_ino, d_type);
+		buf->rdstate->offset++;
+		verify_rdstate_offset(buf->rdstate);
 	}
 	/*
 	 * If we did fill it, stuff it in our hash, otherwise return an


More information about the unionfs-cvs mailing list