ether: fix local address check

cppcheck reports show that is_local_admin_ether_addr() was broken:
	Expression '(X & 0x2) == 0x1' is always false

Reported-by: David Binderman <dcb314@hotmail.com>
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
This commit is contained in:
Thomas Monjalon 2014-08-01 17:53:51 +02:00
parent 06c1bfd94a
commit 030df0102c

View File

@ -205,7 +205,7 @@ static inline int is_universal_ether_addr(const struct ether_addr *ea)
*/
static inline int is_local_admin_ether_addr(const struct ether_addr *ea)
{
return ((ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR) == 1);
return ((ea->addr_bytes[0] & ETHER_LOCAL_ADMIN_ADDR) != 0);
}
/**