Messages in this thread Patch in this message | | | From | Luis de Bethencourt <> | Subject | [PATCH] fs: befs: remove ignored length of buffer | Date | Wed, 29 Jun 2016 19:03:06 +0100 |
| |
When befs_nls2utf() returns an error, the caller ignores the length of the output buffer since it knows the buffer isn't useful. Removing the length assignment that will be ignored.
Signed-off-by: Luis de Bethencourt <luisbg@osg.samsung.com> ---
Hi,
Noticed this while continuing to familiarize with the befs code.
As a matter of fact, the only caller of befs_nls2utf() ignores the value of out_len even when the function succeeds. I was considering that this parameter could be removed completely.
The only con to doing so I can think of is losing the symmetry with the matching befs_utf2nls(). Which is why I am asking here before proposing that patch.
Thanks, Luis
fs/befs/linuxvfs.c | 1 - 1 file changed, 1 deletion(-)
diff --git a/fs/befs/linuxvfs.c b/fs/befs/linuxvfs.c index 06d29a3..5c99012 100644 --- a/fs/befs/linuxvfs.c +++ b/fs/befs/linuxvfs.c @@ -614,7 +614,6 @@ befs_nls2utf(struct super_block *sb, const char *in, *out = result = kmalloc(maxlen, GFP_NOFS); if (!*out) { - *out_len = 0; return -ENOMEM; } -- 2.5.1
| |