Commit 50858ef9 authored by Luis de Bethencourt's avatar Luis de Bethencourt

befs: remove constant variable

Use macro directly instead of via assigning it to an unchanging variable.
Signed-off-by: default avatarLuis de Bethencourt <luisbg@osg.samsung.com>
Acked-by: default avatarSalah Triki <salah.triki@gmail.com>
parent f7769f9c
...@@ -211,7 +211,6 @@ befs_readdir(struct file *file, struct dir_context *ctx) ...@@ -211,7 +211,6 @@ befs_readdir(struct file *file, struct dir_context *ctx)
befs_off_t value; befs_off_t value;
int result; int result;
size_t keysize; size_t keysize;
unsigned char d_type;
char keybuf[BEFS_NAME_LEN + 1]; char keybuf[BEFS_NAME_LEN + 1];
befs_debug(sb, "---> %s name %pD, inode %ld, ctx->pos %lld", befs_debug(sb, "---> %s name %pD, inode %ld, ctx->pos %lld",
...@@ -236,8 +235,6 @@ befs_readdir(struct file *file, struct dir_context *ctx) ...@@ -236,8 +235,6 @@ befs_readdir(struct file *file, struct dir_context *ctx)
return 0; return 0;
} }
d_type = DT_UNKNOWN;
/* Convert to NLS */ /* Convert to NLS */
if (BEFS_SB(sb)->nls) { if (BEFS_SB(sb)->nls) {
char *nlsname; char *nlsname;
...@@ -249,14 +246,14 @@ befs_readdir(struct file *file, struct dir_context *ctx) ...@@ -249,14 +246,14 @@ befs_readdir(struct file *file, struct dir_context *ctx)
return result; return result;
} }
if (!dir_emit(ctx, nlsname, nlsnamelen, if (!dir_emit(ctx, nlsname, nlsnamelen,
(ino_t) value, d_type)) { (ino_t) value, DT_UNKNOWN)) {
kfree(nlsname); kfree(nlsname);
return 0; return 0;
} }
kfree(nlsname); kfree(nlsname);
} else { } else {
if (!dir_emit(ctx, keybuf, keysize, if (!dir_emit(ctx, keybuf, keysize,
(ino_t) value, d_type)) (ino_t) value, DT_UNKNOWN))
return 0; return 0;
} }
ctx->pos++; ctx->pos++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment