Skip to content

Commit 0200cee

Browse files
ColinIanKingjwrdegoede
authored andcommitted
vboxsf: remove redundant variable out_len
The variable out_len is being used to accumulate the number of bytes but it is not being used for any other purpose. The variable is redundant and can be removed. Cleans up clang scan build warning: fs/vboxsf/utils.c:443:9: warning: variable 'out_len' set but not used [-Wunused-but-set-variable] Signed-off-by: Colin Ian King <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Hans de Goede <[email protected]> Signed-off-by: Hans de Goede <[email protected]>
1 parent 4cece76 commit 0200cee

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

fs/vboxsf/utils.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -440,15 +440,13 @@ int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len,
440440
{
441441
const char *in;
442442
char *out;
443-
size_t out_len;
444443
size_t out_bound_len;
445444
size_t in_bound_len;
446445

447446
in = utf8_name;
448447
in_bound_len = utf8_len;
449448

450449
out = name;
451-
out_len = 0;
452450
/* Reserve space for terminating 0 */
453451
out_bound_len = name_bound_len - 1;
454452

@@ -469,7 +467,6 @@ int vboxsf_nlscpy(struct vboxsf_sbi *sbi, char *name, size_t name_bound_len,
469467

470468
out += nb;
471469
out_bound_len -= nb;
472-
out_len += nb;
473470
}
474471

475472
*out = 0;

0 commit comments

Comments
 (0)