net: Convert struct net_device uc_promisc to bool
authorJoe Perches <joe@perches.com>
Mon, 25 Jul 2011 23:17:35 +0000 (16:17 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 25 Jul 2011 23:17:35 +0000 (16:17 -0700)
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>
include/linux/netdevice.h
net/core/dev.c

index 34f3abc6457a73cd3044a9435962ead55d99d2d4..1d92acc0777ba70f8b86f6b936d4ffdec2b9c6bf 100644 (file)
@@ -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;
 
index 9444c5cb413798f8b620f1a3a6b703a7c413e55e..17d67b579beb0c3f6f97bfd8add5d7027741854a 100644 (file)
@@ -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)