]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
netdevice: change net_device->promiscuity/allmulti to unsigned int
authorWang Chen <wangchen@cn.fujitsu.com>
Wed, 18 Jun 2008 04:12:48 +0000 (21:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 18 Jun 2008 04:12:48 +0000 (21:12 -0700)
The comments of dev_set_allmulti/promiscuity() is that "While the count in
the device remains above zero...". So negative count is useless.
Fix the type of the counter from "int" to "unsigned int".

Signed-off-by: Wang Chen <wangchen@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/netdevice.h

index f27fd2009334922325866c69d2abe42bb45bfd67..06d8ea5992df6b6cb56c8891e2bd09726ab93a04 100644 (file)
@@ -595,8 +595,8 @@ struct net_device
        int                     uc_promisc;
        struct dev_addr_list    *mc_list;       /* Multicast mac addresses      */
        int                     mc_count;       /* Number of installed mcasts   */
-       int                     promiscuity;
-       int                     allmulti;
+       unsigned int            promiscuity;
+       unsigned int            allmulti;
 
 
        /* Protocol specific pointers */