ipv6: coding style: comparison for equality with NULL
The ipv6 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
bc48878c06
commit
63159f29be
@@ -218,7 +218,7 @@ static struct ip6_tnl *vti6_tnl_create(struct net *net, struct __ip6_tnl_parm *p
|
||||
sprintf(name, "ip6_vti%%d");
|
||||
|
||||
dev = alloc_netdev(sizeof(*t), name, NET_NAME_UNKNOWN, vti6_dev_setup);
|
||||
if (dev == NULL)
|
||||
if (!dev)
|
||||
goto failed;
|
||||
|
||||
dev_net_set(dev, net);
|
||||
@@ -716,7 +716,7 @@ vti6_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
} else {
|
||||
memset(&p, 0, sizeof(p));
|
||||
}
|
||||
if (t == NULL)
|
||||
if (!t)
|
||||
t = netdev_priv(dev);
|
||||
vti6_parm_to_user(&p, &t->parms);
|
||||
if (copy_to_user(ifr->ifr_ifru.ifru_data, &p, sizeof(p)))
|
||||
@@ -767,7 +767,7 @@ vti6_ioctl(struct net_device *dev, struct ifreq *ifr, int cmd)
|
||||
err = -ENOENT;
|
||||
vti6_parm_from_user(&p1, &p);
|
||||
t = vti6_locate(net, &p1, 0);
|
||||
if (t == NULL)
|
||||
if (!t)
|
||||
break;
|
||||
err = -EPERM;
|
||||
if (t->dev == ip6n->fb_tnl_dev)
|
||||
|
Reference in New Issue
Block a user