mirror of
git://git.code.sf.net/p/xtables-addons/xtables-addons
synced 2025-09-07 21:25:12 +02:00
xt_iface: reduce indent by early return
This commit is contained in:
@@ -53,16 +53,17 @@ static bool xt_iface_mt(const struct sk_buff *skb,
|
|||||||
#else
|
#else
|
||||||
dev = dev_get_by_name(info->ifname);
|
dev = dev_get_by_name(info->ifname);
|
||||||
#endif
|
#endif
|
||||||
retval = dev != NULL;
|
if (dev == NULL)
|
||||||
if (retval) {
|
return false;
|
||||||
for (i = 0; i < ARRAY_SIZE(xt_iface_lookup) && retval; ++i) {
|
|
||||||
if (info->flags & xt_iface_lookup[i].iface_flag)
|
retval = true;
|
||||||
retval &= dev->flags & xt_iface_lookup[i].iff_flag;
|
for (i = 0; i < ARRAY_SIZE(xt_iface_lookup) && retval; ++i) {
|
||||||
if (info->invflags & xt_iface_lookup[i].iface_flag)
|
if (info->flags & xt_iface_lookup[i].iface_flag)
|
||||||
retval &= !(dev->flags & xt_iface_lookup[i].iff_flag);
|
retval &= dev->flags & xt_iface_lookup[i].iff_flag;
|
||||||
}
|
if (info->invflags & xt_iface_lookup[i].iface_flag)
|
||||||
dev_put(dev);
|
retval &= !(dev->flags & xt_iface_lookup[i].iff_flag);
|
||||||
}
|
}
|
||||||
|
dev_put(dev);
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user