summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2011-07-25 16:17:35 -0700
committerDavid S. Miller <davem@davemloft.net>2011-07-25 16:17:35 -0700
commit2d348d1f569f051d2609b04d27bb55cd25eda8fe (patch)
tree877e13a3ae4ac76c7a64911c10f5600a314e56ab
parent48daec034b2669c634983d0435beac41190b4c91 (diff)
downloadlinux-3.10-2d348d1f569f051d2609b04d27bb55cd25eda8fe.tar.gz
linux-3.10-2d348d1f569f051d2609b04d27bb55cd25eda8fe.tar.bz2
linux-3.10-2d348d1f569f051d2609b04d27bb55cd25eda8fe.zip
net: Convert struct net_device uc_promisc to bool
No need to use int, its uses are boolean. May save a few bytes one day. Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--include/linux/netdevice.h2
-rw-r--r--net/core/dev.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 34f3abc6457..1d92acc0777 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -1132,7 +1132,7 @@ struct net_device {
spinlock_t addr_list_lock;
struct netdev_hw_addr_list uc; /* Unicast mac addresses */
struct netdev_hw_addr_list mc; /* Multicast mac addresses */
- int uc_promisc;
+ bool uc_promisc;
unsigned int promiscuity;
unsigned int allmulti;
diff --git a/net/core/dev.c b/net/core/dev.c
index 9444c5cb413..17d67b579be 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -4497,10 +4497,10 @@ void __dev_set_rx_mode(struct net_device *dev)
*/
if (!netdev_uc_empty(dev) && !dev->uc_promisc) {
__dev_set_promiscuity(dev, 1);
- dev->uc_promisc = 1;
+ dev->uc_promisc = true;
} else if (netdev_uc_empty(dev) && dev->uc_promisc) {
__dev_set_promiscuity(dev, -1);
- dev->uc_promisc = 0;
+ dev->uc_promisc = false;
}
if (ops->ndo_set_multicast_list)