From: ye xingchen Date: Fri, 18 Nov 2022 09:46:32 +0000 (+0100) Subject: xfs: Remove the unneeded result variable X-Git-Tag: origin/for-next_2022-11-30~21 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e8dbbca18d8d1aefaec35384c718828e64bbb4d1;p=thirdparty%2Fxfsprogs-dev.git xfs: Remove the unneeded result variable Source kernel commit: abda5271f8ec6e9a84ae8129ddc59226c89def7a Return the value xfs_dir_cilookup_result() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner Signed-off-by: Carlos Maiolino --- diff --git a/libxfs/xfs_dir2_sf.c b/libxfs/xfs_dir2_sf.c index e97799b96..08b36c95c 100644 --- a/libxfs/xfs_dir2_sf.c +++ b/libxfs/xfs_dir2_sf.c @@ -865,7 +865,6 @@ xfs_dir2_sf_lookup( struct xfs_inode *dp = args->dp; struct xfs_mount *mp = dp->i_mount; int i; /* entry index */ - int error; xfs_dir2_sf_entry_t *sfep; /* shortform directory entry */ xfs_dir2_sf_hdr_t *sfp; /* shortform structure */ enum xfs_dacmp cmp; /* comparison result */ @@ -929,8 +928,7 @@ xfs_dir2_sf_lookup( if (!ci_sfep) return -ENOENT; /* otherwise process the CI match as required by the caller */ - error = xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen); - return error; + return xfs_dir_cilookup_result(args, ci_sfep->name, ci_sfep->namelen); } /*