Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1276899

[PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero

From Colin King <colin.king@canonical.com>
Newsgroups linux.kernel
Subject [PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero
Date 2015-11-25 00:20 +0100
Message-ID <qyv2p-6iN-5@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


From: Colin Ian King <colin.king@canonical.com>

Add the missing curly braces so that rc is only set to zero when
it is non-zero.  Without this minor fix, rc is set to zero even
when it is zero, which is slightly redundant.

Detected with smatch static analysis.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 net/sunrpc/xprtrdma/verbs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/sunrpc/xprtrdma/verbs.c b/net/sunrpc/xprtrdma/verbs.c
index eadd1655..2cc1014 100644
--- a/net/sunrpc/xprtrdma/verbs.c
+++ b/net/sunrpc/xprtrdma/verbs.c
@@ -852,10 +852,11 @@ retry:
 
 		if (extras) {
 			rc = rpcrdma_ep_post_extra_recv(r_xprt, extras);
-			if (rc)
+			if (rc) {
 				pr_warn("%s: rpcrdma_ep_post_extra_recv: %i\n",
 					__func__, rc);
 				rc = 0;
+			}
 		}
 	}
 
-- 
2.6.2

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] xprtrdma: add missing curly braces, set rc to zero on non-zero Colin King <colin.king@canonical.com> - 2015-11-25 00:20 +0100

csiph-web