basic: simplify ether_addr_is_null
This commit is contained in:
@@ -28,5 +28,10 @@
|
||||
#define ETHER_ADDR_TO_STRING_MAX (3*6)
|
||||
char* ether_addr_to_string(const struct ether_addr *addr, char buffer[ETHER_ADDR_TO_STRING_MAX]);
|
||||
|
||||
bool ether_addr_is_null(const struct ether_addr *addr);
|
||||
bool ether_addr_equal(const struct ether_addr *a, const struct ether_addr *b);
|
||||
|
||||
#define ETHER_ADDR_NULL ((const struct ether_addr){})
|
||||
|
||||
static inline bool ether_addr_is_null(const struct ether_addr *addr) {
|
||||
return ether_addr_equal(addr, ÐER_ADDR_NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user