[PATCH 03/10] cifs: Slightly simplify cifs_readdir()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"else" not needed, we do a "goto" in the if-branch. This makes the
following condition a bit easier to read for me.

Signed-off-by: Volker Lendecke <vl@xxxxxxxxx>
---
 fs/cifs/readdir.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c
index ef638086d734..7dfa33b6954f 100644
--- a/fs/cifs/readdir.c
+++ b/fs/cifs/readdir.c
@@ -1165,7 +1165,8 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
 	if (rc) {
 		cifs_dbg(FYI, "fce error %d\n", rc);
 		goto rddir2_exit;
-	} else if (current_entry != NULL) {
+	}
+	if (current_entry != NULL) {
 		cifs_dbg(FYI, "entry %lld found\n", ctx->pos);
 	} else {
 		if (cfid) {
-- 
2.30.2




[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux