]> Git Repo - linux.git/blobdiff - net/ipv4/ip_tunnel.c
ipv4: coding style: comparison for equality with NULL
[linux.git] / net / ipv4 / ip_tunnel.c
index 4bb7252110a6f21a08a090f41e7aec8c349e43f8..31eaa9ba1803a81b079d62e839ccf0e37225dc85 100644 (file)
@@ -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))
This page took 0.023701 seconds and 4 git commands to generate.