ipv6: fix warning in xfrm6_mode_tunnel_input
Subsystems (3)
PATCH 1/1 ipv6: fix warning in xfrm6_mode_tunnel_input
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 <[email protected]> Date: Thu Feb 14 09:44:49 2013 +0000
net: Add skb_unclone() helper function.
net/ipv6/xfrm6_mode_tunnel.c +2 -1
@@ -69,7 +69,8 @@ static int xfrm6_mode_tunnel_input(strucif (!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 )
PATCH 1/1 ip: fix warning in xfrm4_mode_tunnel_input
Same problem as IPv6
net/ipv4/xfrm4_mode_tunnel.c +2 -1
@@ -142,7 +142,8 @@ static int xfrm4_mode_tunnel_input(strucfor_each_input_rcu (rcv_notify_handlers, handler) handler->handler (skb); -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 )
From: Stephen Hemminger <[email protected]>
Date: Sat, 16 Feb 2013 09:38:15 -0800
Quoted 5 lines
Should not use assignment in conditional:
warning: suggest parentheses around assignment used as truth value [-Wparentheses]Problem introduced by:
commit14bbd6a565e1bcdc240d44687edb93f721cfdf99
Quoted 7 lines
Author: Pravin B Shelar <[email protected]> Date: Thu Feb 14 09:44:49 2013 +0000net: Add
skb_unclone()helper function.Signed-off-by Stephen Hemminger <[email protected]>
Applied.
Re: [PATCH net-next] ip: fix warning in xfrm4_mode_tunnel_input
In reply to Stephen HemmingerFrom: Stephen Hemminger <[email protected]>
Date: Sat, 16 Feb 2013 09:40:29 -0800
Quoted 3 lines
Same problem as IPv6
Signed-off-by Stephen Hemminger <[email protected]>
Applied.