Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1434920

[PATCH 2/3] befs: remove constant variable

From Luis de Bethencourt <luisbg@osg.samsung.com>
Newsgroups linux.kernel
Subject [PATCH 2/3] befs: remove constant variable
Date 2016-07-01 02:10 +0200
Message-ID <rPUbT-7Nl-11@gated-at.bofh.it> (permalink)
References <rPUbT-7Nl-7@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Use macro directly instead of via assigning it to an unchanging variable.

Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com>
---
 fs/befs/linuxvfs.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c
index 6740b0d..a16421a 100644
--- a/fs/befs/linuxvfs.c
+++ b/fs/befs/linuxvfs.c
@@ -211,7 +211,6 @@ befs_readdir(struct file *file, struct dir_context *ctx)
 	befs_off_t value;
 	int result;
 	size_t keysize;
-	unsigned char d_type;
 	char keybuf[BEFS_NAME_LEN + 1];
 
 	befs_debug(sb, "---> %s name %pD, inode %ld, ctx->pos %lld",
@@ -236,8 +235,6 @@ more:
 		return 0;
 	}
 
-	d_type = DT_UNKNOWN;
-
 	/* Convert to NLS */
 	if (BEFS_SB(sb)->nls) {
 		char *nlsname;
@@ -249,14 +246,14 @@ more:
 			return result;
 		}
 		if (!dir_emit(ctx, nlsname, nlsnamelen,
-				 (ino_t) value, d_type)) {
+				 (ino_t) value, DT_UNKNOWN)) {
 			kfree(nlsname);
 			return 0;
 		}
 		kfree(nlsname);
 	} else {
 		if (!dir_emit(ctx, keybuf, keysize,
-				 (ino_t) value, d_type))
+				 (ino_t) value, DT_UNKNOWN))
 			return 0;
 	}
 	ctx->pos++;
-- 
2.5.1

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 1/3] befs: avoid dereferencing dentry twice Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-01 02:10 +0200
  [PATCH 3/3] befs: use simpler while loop Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-01 02:10 +0200
  [PATCH 2/3] befs: remove constant variable Luis de Bethencourt <luisbg@osg.samsung.com> - 2016-07-01 02:10 +0200

csiph-web