Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4ccce02e authored by Benjamin Poirier's avatar Benjamin Poirier Committed by David S. Miller
Browse files

netdevice: Add missing parentheses in macro



For example, one could conceivably call
	for_each_netdev_in_bond_rcu(condition ? bond1 : bond2, slave)
and get an unexpected result.

Signed-off-by: default avatarBenjamin Poirier <bpoirier@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d92cfdbb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2085,7 +2085,7 @@ extern rwlock_t dev_base_lock; /* Device list lock */
	list_for_each_entry_continue_rcu(d, &(net)->dev_base_head, dev_list)
#define for_each_netdev_in_bond_rcu(bond, slave)	\
		for_each_netdev_rcu(&init_net, slave)	\
			if (netdev_master_upper_dev_get_rcu(slave) == bond)
			if (netdev_master_upper_dev_get_rcu(slave) == (bond))
#define net_device_entry(lh)	list_entry(lh, struct net_device, dev_list)

static inline struct net_device *next_net_device(struct net_device *dev)