2021-02-26 01:25:33

by Zhiqiang Liu

[permalink] [raw]
Subject: [PATCH] misc: remove useless code in set_inode_xattr()


In set_inode_xattr(), there are two returns as follows,
-
return retval;
return 0;
-
Here, we remove useless 'return 0;' code.

Signed-off-by: Zhiqiang Liu <[email protected]>
---
misc/create_inode.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/misc/create_inode.c b/misc/create_inode.c
index 54d8d343..d62e1cb4 100644
--- a/misc/create_inode.c
+++ b/misc/create_inode.c
@@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
retval = retval ? retval : close_retval;
}
return retval;
- return 0;
}
#else /* HAVE_LLISTXATTR */
static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
--
2.19.1


2021-03-04 09:42:22

by Zhiqiang Liu

[permalink] [raw]
Subject: Re: [PATCH] misc: remove useless code in set_inode_xattr()

ping...

On 2021/2/26 9:22, Zhiqiang Liu wrote:
>
> In set_inode_xattr(), there are two returns as follows,
> -
> return retval;
> return 0;
> -
> Here, we remove useless 'return 0;' code.
>
> Signed-off-by: Zhiqiang Liu <[email protected]>
> ---
> misc/create_inode.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/misc/create_inode.c b/misc/create_inode.c
> index 54d8d343..d62e1cb4 100644
> --- a/misc/create_inode.c
> +++ b/misc/create_inode.c
> @@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
> retval = retval ? retval : close_retval;
> }
> return retval;
> - return 0;
> }
> #else /* HAVE_LLISTXATTR */
> static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
>

2021-03-04 14:09:58

by Andreas Dilger

[permalink] [raw]
Subject: Re: [PATCH] misc: remove useless code in set_inode_xattr()

On 2021/2/26 9:22, Zhiqiang Liu wrote:
>
> In set_inode_xattr(), there are two returns as follows,
> -
> return retval;
> return 0;
> -
> Here, we remove useless 'return 0;' code.
>
> Signed-off-by: Zhiqiang Liu <[email protected]>

Reviewed-by: Andreas Dilger <[email protected]>

> ---
> misc/create_inode.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/misc/create_inode.c b/misc/create_inode.c
> index 54d8d343..d62e1cb4 100644
> --- a/misc/create_inode.c
> +++ b/misc/create_inode.c
> @@ -234,7 +234,6 @@ static errcode_t set_inode_xattr(ext2_filsys fs, ext2_ino_t ino,
> retval = retval ? retval : close_retval;
> }
> return retval;
> - return 0;
> }
> #else /* HAVE_LLISTXATTR */
> static errcode_t set_inode_xattr(ext2_filsys fs EXT2FS_ATTR((unused)),
>



Cheers, Andreas






Attachments:
signature.asc (890.00 B)
Message signed with OpenPGP

2021-04-02 19:58:41

by Theodore Ts'o

[permalink] [raw]
Subject: Re: [PATCH] misc: remove useless code in set_inode_xattr()

On Wed, Mar 03, 2021 at 01:20:33PM -0700, Andreas Dilger wrote:
> On 2021/2/26 9:22, Zhiqiang Liu wrote:
> >
> > In set_inode_xattr(), there are two returns as follows,
> > -
> > return retval;
> > return 0;
> > -
> > Here, we remove useless 'return 0;' code.
> >
> > Signed-off-by: Zhiqiang Liu <[email protected]>
>
> Reviewed-by: Andreas Dilger <[email protected]>

Thanks, applied.

- Ted