[PATCH V2 net-next] esp4: remove assignment in if condition

Subsystems: networking [general], networking [ipsec], the rest

STALE4296d

2 messages, 2 authors, 2014-11-04 · open the first message on its own page

[PATCH V2 net-next] esp4: remove assignment in if condition

From: Fabian Frederick <hidden>
Date: 2014-11-04 21:54:51

Signed-off-by: Fabian Frederick <redacted>
---
V2: remove blank line between set and test (suggested by Joe Perches).

 net/ipv4/esp4.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/net/ipv4/esp4.c b/net/ipv4/esp4.c
index 360b565..d2bf02e 100644
--- a/net/ipv4/esp4.c
+++ b/net/ipv4/esp4.c
@@ -392,8 +392,10 @@ static int esp_input(struct xfrm_state *x, struct sk_buff *skb)
 	if (elen <= 0)
 		goto out;
 
-	if ((err = skb_cow_data(skb, 0, &trailer)) < 0)
+	err = skb_cow_data(skb, 0, &trailer);
+	if (err < 0)
 		goto out;
+
 	nfrags = err;
 
 	assoclen = sizeof(*esph);
-- 
1.9.3

Re: [PATCH V2 net-next] esp4: remove assignment in if condition

From: David Miller <davem@davemloft.net>
Date: 2014-11-04 21:58:43

From: Fabian Frederick <redacted>
Date: Tue,  4 Nov 2014 22:54:36 +0100
Signed-off-by: Fabian Frederick <redacted>
---
V2: remove blank line between set and test (suggested by Joe Perches).
Applied, thanks.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help