All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <yjwei@cn.fujitsu.com>
To: linux-sctp@vger.kernel.org
Subject: Re: [PATCH 2/2] sctp: Remove store to ret as it is not used
Date: Mon, 17 Jan 2011 02:07:22 +0000	[thread overview]
Message-ID: <4D33A45A.2080109@cn.fujitsu.com> (raw)
In-Reply-To: <1294657090-2789-3-git-send-email-holger@freyther.de>


> From: Holger Hans Peter Freyther <zecke@selfish.org>
>
> The store to ret is not needed. In case it is 0 the method
> will be exited directly, if not ret will be assigned again
> and then returned to the caller.
>
> Signed-off-by: Holger Hans Peter Freyther <zecke@selfish.org>
> ---
>  net/sctp/socket.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/net/sctp/socket.c b/net/sctp/socket.c
> index e47e39e..b8dad82 100644
> --- a/net/sctp/socket.c
> +++ b/net/sctp/socket.c
> @@ -393,7 +393,7 @@ SCTP_STATIC int sctp_do_bind(struct sock *sk, union sctp_addr *addr, int len)
>  	 * detection.
>  	 */
>  	addr->v4.sin_port = htons(snum);
> -	if ((ret = sctp_get_port_local(sk, addr))) {
> +	if (sctp_get_port_local(sk, addr)) {
>  		return -EADDRINUSE;
>  	}

shoud be change to:

-	if ((ret = sctp_get_port_local(sk, addr))) {
+	if (sctp_get_port_local(sk, addr))
  		return -EADDRINUSE;
-  	}

{} is not need.

Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>

You may need fix your patch and cc to David Miller <davem@davemloft.net>
with my ACK.


>  

      reply	other threads:[~2011-01-17  2:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-10 10:58 [PATCH 2/2] sctp: Remove store to ret as it is not used Holger Hans Peter Freyther
2011-01-17  2:07 ` Wei Yongjun [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D33A45A.2080109@cn.fujitsu.com \
    --to=yjwei@cn.fujitsu.com \
    --cc=linux-sctp@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.