2020-10-20 06:23:21

by Tom Rix

[permalink] [raw]
Subject: [PATCH] fs: ocfs2 remove unneeded break

From: Tom Rix <[email protected]>

A break is not needed if it is preceded by a goto

Signed-off-by: Tom Rix <[email protected]>
---
fs/ocfs2/cluster/tcp.c | 1 -
1 file changed, 1 deletion(-)

diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
index 79a231719460..3bd8119bed5e 100644
--- a/fs/ocfs2/cluster/tcp.c
+++ b/fs/ocfs2/cluster/tcp.c
@@ -1198,7 +1198,6 @@ static int o2net_process_message(struct o2net_sock_container *sc,
msglog(hdr, "bad magic\n");
ret = -EINVAL;
goto out;
- break;
}

/* find a handler for it */
--
2.18.1


2020-10-20 08:54:24

by Joseph Qi

[permalink] [raw]
Subject: Re: [PATCH] fs: ocfs2 remove unneeded break



On 2020/10/20 01:52, [email protected] wrote:
> From: Tom Rix <[email protected]>
>
> A break is not needed if it is preceded by a goto
>
> Signed-off-by: Tom Rix <[email protected]>

Acked-by: Joseph Qi <[email protected]>
> ---
> fs/ocfs2/cluster/tcp.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/fs/ocfs2/cluster/tcp.c b/fs/ocfs2/cluster/tcp.c
> index 79a231719460..3bd8119bed5e 100644
> --- a/fs/ocfs2/cluster/tcp.c
> +++ b/fs/ocfs2/cluster/tcp.c
> @@ -1198,7 +1198,6 @@ static int o2net_process_message(struct o2net_sock_container *sc,
> msglog(hdr, "bad magic\n");
> ret = -EINVAL;
> goto out;
> - break;
> }
>
> /* find a handler for it */
>