net: use net_eq to compare nets
Generated with the following semantic patch @@ struct net *n1; struct net *n2; @@ - n1 == n2 + net_eq(n1, n2) @@ struct net *n1; struct net *n2; @@ - n1 != n2 + !net_eq(n1, n2) applied over {include,net,drivers/net}. Signed-off-by: Octavian Purdila <opurdila@ixiacom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Este cometimento está contido em:

cometido por
David S. Miller

ascendente
4ba3eb034f
cometimento
09ad9bc752
@@ -57,7 +57,7 @@ static int hdlc_rcv(struct sk_buff *skb, struct net_device *dev,
|
||||
{
|
||||
struct hdlc_device *hdlc = dev_to_hdlc(dev);
|
||||
|
||||
if (dev_net(dev) != &init_net) {
|
||||
if (!net_eq(dev_net(dev), &init_net)) {
|
||||
kfree_skb(skb);
|
||||
return 0;
|
||||
}
|
||||
@@ -102,7 +102,7 @@ static int hdlc_device_event(struct notifier_block *this, unsigned long event,
|
||||
unsigned long flags;
|
||||
int on;
|
||||
|
||||
if (dev_net(dev) != &init_net)
|
||||
if (!net_eq(dev_net(dev), &init_net))
|
||||
return NOTIFY_DONE;
|
||||
|
||||
if (!(dev->priv_flags & IFF_WAN_HDLC))
|
||||
|
Criar uma nova questão referindo esta
Bloquear um utilizador