diff options
author | Joe Perches <joe@perches.com> | 2012-05-08 02:44:40 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-05-08 13:06:16 -0400 |
commit | b44907e64cc1987153f6577306108379be1523b7 (patch) | |
tree | 09ec9814903e61a85f51de0249f65e1a25f40aa4 /include/linux/etherdevice.h | |
parent | 97138a1ca7917c11431293e668457f916a610ca5 (diff) |
etherdev.h: Convert int is_<foo>_ether_addr to bool
Make the return value explicitly true or false.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/etherdevice.h')
-rw-r--r-- | include/linux/etherdevice.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/etherdevice.h b/include/linux/etherdevice.h index fe5136d81454..c47631fac229 100644 --- a/include/linux/etherdevice.h +++ b/include/linux/etherdevice.h | |||
@@ -59,7 +59,7 @@ extern struct net_device *alloc_etherdev_mqs(int sizeof_priv, unsigned int txqs, | |||
59 | * | 59 | * |
60 | * Return true if the address is all zeroes. | 60 | * Return true if the address is all zeroes. |
61 | */ | 61 | */ |
62 | static inline int is_zero_ether_addr(const u8 *addr) | 62 | static inline bool is_zero_ether_addr(const u8 *addr) |
63 | { | 63 | { |
64 | return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); | 64 | return !(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]); |
65 | } | 65 | } |
@@ -71,7 +71,7 @@ static inline int is_zero_ether_addr(const u8 *addr) | |||
71 | * Return true if the address is a multicast address. | 71 | * Return true if the address is a multicast address. |
72 | * By definition the broadcast address is also a multicast address. | 72 | * By definition the broadcast address is also a multicast address. |
73 | */ | 73 | */ |
74 | static inline int is_multicast_ether_addr(const u8 *addr) | 74 | static inline bool is_multicast_ether_addr(const u8 *addr) |
75 | { | 75 | { |
76 | return 0x01 & addr[0]; | 76 | return 0x01 & addr[0]; |
77 | } | 77 | } |
@@ -82,7 +82,7 @@ static inline int is_multicast_ether_addr(const u8 *addr) | |||
82 | * | 82 | * |
83 | * Return true if the address is a local address. | 83 | * Return true if the address is a local address. |
84 | */ | 84 | */ |
85 | static inline int is_local_ether_addr(const u8 *addr) | 85 | static inline bool is_local_ether_addr(const u8 *addr) |
86 | { | 86 | { |
87 | return 0x02 & addr[0]; | 87 | return 0x02 & addr[0]; |
88 | } | 88 | } |
@@ -93,7 +93,7 @@ static inline int is_local_ether_addr(const u8 *addr) | |||
93 | * | 93 | * |
94 | * Return true if the address is the broadcast address. | 94 | * Return true if the address is the broadcast address. |
95 | */ | 95 | */ |
96 | static inline int is_broadcast_ether_addr(const u8 *addr) | 96 | static inline bool is_broadcast_ether_addr(const u8 *addr) |
97 | { | 97 | { |
98 | return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; | 98 | return (addr[0] & addr[1] & addr[2] & addr[3] & addr[4] & addr[5]) == 0xff; |
99 | } | 99 | } |
@@ -104,7 +104,7 @@ static inline int is_broadcast_ether_addr(const u8 *addr) | |||
104 | * | 104 | * |
105 | * Return true if the address is a unicast address. | 105 | * Return true if the address is a unicast address. |
106 | */ | 106 | */ |
107 | static inline int is_unicast_ether_addr(const u8 *addr) | 107 | static inline bool is_unicast_ether_addr(const u8 *addr) |
108 | { | 108 | { |
109 | return !is_multicast_ether_addr(addr); | 109 | return !is_multicast_ether_addr(addr); |
110 | } | 110 | } |
@@ -118,7 +118,7 @@ static inline int is_unicast_ether_addr(const u8 *addr) | |||
118 | * | 118 | * |
119 | * Return true if the address is valid. | 119 | * Return true if the address is valid. |
120 | */ | 120 | */ |
121 | static inline int is_valid_ether_addr(const u8 *addr) | 121 | static inline bool is_valid_ether_addr(const u8 *addr) |
122 | { | 122 | { |
123 | /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to | 123 | /* FF:FF:FF:FF:FF:FF is a multicast address so we don't need to |
124 | * explicitly check for it here. */ | 124 | * explicitly check for it here. */ |