driver: macvlan: Replace integer number with bool value
authorGao Feng <gfree.wind@gmail.com>
Mon, 14 Nov 2016 00:24:19 +0000 (08:24 +0800)
committerDavid S. Miller <davem@davemloft.net>
Mon, 14 Nov 2016 21:36:00 +0000 (16:36 -0500)
The return value of function macvlan_addr_busy is used as bool value,
so use bool value instead of integer number "1" and "0".

Signed-off-by: Gao Feng <gfree.wind@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/macvlan.c

index a064415..d0361f3 100644 (file)
@@ -179,20 +179,20 @@ static void macvlan_hash_change_addr(struct macvlan_dev *vlan,
        macvlan_hash_add(vlan);
 }
 
-static int macvlan_addr_busy(const struct macvlan_port *port,
-                               const unsigned char *addr)
+static bool macvlan_addr_busy(const struct macvlan_port *port,
+                             const unsigned char *addr)
 {
        /* Test to see if the specified multicast address is
         * currently in use by the underlying device or
         * another macvlan.
         */
        if (ether_addr_equal_64bits(port->dev->dev_addr, addr))
-               return 1;
+               return true;
 
        if (macvlan_hash_lookup(port, addr))
-               return 1;
+               return true;
 
-       return 0;
+       return false;
 }