Skip to content

Commit abda527

Browse files
ye xingchendchinner
authored andcommitted
xfs: Remove the unneeded result variable
Return the value xfs_dir_cilookup_result() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot <[email protected]> Signed-off-by: ye xingchen <[email protected]> Reviewed-by: Darrick J. Wong <[email protected]> Signed-off-by: Dave Chinner <[email protected]>
1 parent 8838daf commit abda527

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

fs/xfs/libxfs/xfs_dir2_sf.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,6 @@ xfs_dir2_sf_lookup(
865865
struct xfs_inode *dp = args->dp;
866866
struct xfs_mount *mp = dp->i_mount;
867867
int i; /* entry index */
868-
int error;
869868
xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */
870869
xfs_dir2_sf_hdr_t *sfp; /* shortform structure */
871870
enum xfs_dacmp cmp; /* comparison result */
@@ -929,8 +928,7 @@ xfs_dir2_sf_lookup(
929928
if (!ci_sfep)
930929
return -ENOENT;
931930
/* otherwise process the CI match as required by the caller */
932-
error = xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen);
933-
return error;
931+
return xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen);
934932
}
935933

936934
/*

0 commit comments

Comments
 (0)