Skip to content

Commit

Permalink
driver: macvlan: Replace integer number with bool value
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
gfreewind authored and davem330 committed Nov 14, 2016
1 parent 535e7b4 commit d94d025
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions drivers/net/macvlan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}


Expand Down

0 comments on commit d94d025

Please sign in to comment.