diff mbox

[net-next] ipv6: fix warning in xfrm6_mode_tunnel_input

Message ID 20130216093815.45e2d8b2@nehalam.linuxnetplumber.net
State Accepted, archived
Delegated to: David Miller
Headers show

Commit Message

Stephen Hemminger Feb. 16, 2013, 5:38 p.m. UTC
Should not use assignment in conditional:
 warning: suggest parentheses around assignment used as truth value [-Wparentheses]

Problem introduced by:
commit 14bbd6a565e1bcdc240d44687edb93f721cfdf99
Author: Pravin B Shelar <pshelar@nicira.com>
Date:   Thu Feb 14 09:44:49 2013 +0000

    net: Add skb_unclone() helper function.
    

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Feb. 18, 2013, 5:43 p.m. UTC | #1
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Sat, 16 Feb 2013 09:38:15 -0800

> Should not use assignment in conditional:
>  warning: suggest parentheses around assignment used as truth value [-Wparentheses]
> 
> Problem introduced by:
> commit 14bbd6a565e1bcdc240d44687edb93f721cfdf99
> Author: Pravin B Shelar <pshelar@nicira.com>
> Date:   Thu Feb 14 09:44:49 2013 +0000
> 
>     net: Add skb_unclone() helper function.
>     
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

--- a/net/ipv6/xfrm6_mode_tunnel.c	2013-02-16 09:09:41.388937316 -0800
+++ b/net/ipv6/xfrm6_mode_tunnel.c	2013-02-16 09:33:49.906203566 -0800
@@ -69,7 +69,8 @@  static int xfrm6_mode_tunnel_input(struc
 	if (!pskb_may_pull(skb, sizeof(struct ipv6hdr)))
 		goto out;
 
-	if (err = skb_unclone(skb, GFP_ATOMIC))
+	err = skb_unclone(skb, GFP_ATOMIC);
+	if (err)
 		goto out;
 
 	if (x->props.flags & XFRM_STATE_DECAP_DSCP)