ipv4: coding style: comparison for equality with NULL
The ipv4 code uses a mixture of coding styles. In some instances check for NULL pointer is done as x == NULL and sometimes as !x. !x is preferred according to checkpatch and this patch makes the code consistent by adopting the latter form. No changes detected by objdiff. Signed-off-by: Ian Morris <ipm@chirality.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
11a9c7821c
commit
51456b2914
@@ -654,7 +654,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
if (dst == 0) {
|
||||
/* NBMA tunnel */
|
||||
|
||||
if (skb_dst(skb) == NULL) {
|
||||
if (!skb_dst(skb)) {
|
||||
dev->stats.tx_fifo_errors++;
|
||||
goto tx_error;
|
||||
}
|
||||
@@ -672,7 +672,7 @@ void ip_tunnel_xmit(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
neigh = dst_neigh_lookup(skb_dst(skb),
|
||||
&ipv6_hdr(skb)->daddr);
|
||||
if (neigh == NULL)
|
||||
if (!neigh)
|
||||
goto tx_error;
|
||||
|
||||
addr6 = (const struct in6_addr *)&neigh->primary_key;
|
||||
@@ -843,7 +843,7 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
|
||||
case SIOCGETTUNNEL:
|
||||
if (dev == itn->fb_tunnel_dev) {
|
||||
t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type);
|
||||
if (t == NULL)
|
||||
if (!t)
|
||||
t = netdev_priv(dev);
|
||||
}
|
||||
memcpy(p, &t->parms, sizeof(*p));
|
||||
@@ -914,7 +914,7 @@ int ip_tunnel_ioctl(struct net_device *dev, struct ip_tunnel_parm *p, int cmd)
|
||||
if (dev == itn->fb_tunnel_dev) {
|
||||
err = -ENOENT;
|
||||
t = ip_tunnel_find(itn, p, itn->fb_tunnel_dev->type);
|
||||
if (t == NULL)
|
||||
if (!t)
|
||||
goto done;
|
||||
err = -EPERM;
|
||||
if (t == netdev_priv(itn->fb_tunnel_dev))
|
||||
|
Reference in New Issue
Block a user