From: Julian Anastasov <j...@ssi.bg> Date: Mon, 26 Oct 2015 23:59:12 +0200
... > -int fib_sync_down_dev(struct net_device *dev, unsigned long event) > +/* Event force Flags Description > + * NETDEV_CHANGE 0 LINKDOWN Carrier OFF, not for scope host > + * NETDEV_DOWN 0 LINKDOWN|DEAD Link down, not for scope host > + * NETDEV_DOWN 1 LINKDOWN|DEAD Last address removed > + * NETDEV_UNREGISTER 2 LINKDOWN|DEAD Device removed > + */ > +int fib_sync_down_dev(struct net_device *dev, unsigned long event, int force) > { > int ret = 0; > int scope = RT_SCOPE_NOWHERE; > @@ -1290,8 +1296,7 @@ int fib_sync_down_dev(struct net_device *dev, unsigned > long event) > struct hlist_head *head = &fib_info_devhash[hash]; > struct fib_nh *nh; > > - if (event == NETDEV_UNREGISTER || > - event == NETDEV_DOWN) > + if (force) > scope = -1; Julian the force variable is only used in a boolean manner, and in fact 'event' + a boolean is enough to distinguish all of the necessary cases so really using a non-bool for 'force' does not convey any extra information. So please use 'bool' and 'true/false' for 'force'. Thanks. -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html