All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sctp: Remove store to ret as it is not used
@ 2011-01-18 11:32 Holger Freyther
  0 siblings, 0 replies; 3+ messages in thread
From: Holger Freyther @ 2011-01-18 11:32 UTC (permalink / raw)
  To: linux-sctp

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>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/socket.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index e47e39e..86ce53d 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -393,9 +393,8 @@ 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;
-	}
  	/* Refresh ephemeral port.  */
 	if (!bp->port)
-- 
1.7.3.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] sctp: Remove store to ret as it is not used
@ 2011-03-23 10:56 ` Holger Freyther
  0 siblings, 0 replies; 3+ messages in thread
From: Holger Freyther @ 2011-03-23 10:56 UTC (permalink / raw)
  To: netdev; +Cc: linux-sctp, Holger Hans Peter Freyther

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>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/socket.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b2bed35..5f72996 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -393,9 +393,8 @@ 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;
-	}
 
 	/* Refresh ephemeral port.  */
 	if (!bp->port)
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH] sctp: Remove store to ret as it is not used
@ 2011-03-23 10:56 ` Holger Freyther
  0 siblings, 0 replies; 3+ messages in thread
From: Holger Freyther @ 2011-03-23 10:56 UTC (permalink / raw)
  To: netdev; +Cc: linux-sctp, Holger Hans Peter Freyther

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>
Acked-by: Wei Yongjun <yjwei@cn.fujitsu.com>
---
 net/sctp/socket.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index b2bed35..5f72996 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -393,9 +393,8 @@ 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;
-	}
 
 	/* Refresh ephemeral port.  */
 	if (!bp->port)
-- 
1.7.4


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-03-23 11:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-18 11:32 [PATCH] sctp: Remove store to ret as it is not used Holger Freyther
  -- strict thread matches above, loose matches on Subject: below --
2011-03-23 10:56 Holger Freyther
2011-03-23 10:56 ` Holger Freyther

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.