summaryrefslogtreecommitdiff
path: root/src/basic/ether-addr-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-02-23 16:54:52 +0100
committerLennart Poettering <lennart@poettering.net>2016-02-23 16:54:52 +0100
commit0ab0c01490bd1452c44ec501dfb68e8f6ac03eb1 (patch)
tree00f1c8fcaba271e6483b05cf9c6181d1d7a048d4 /src/basic/ether-addr-util.h
parenta9ae0709416fe498de85744ce639ba6a9fc50105 (diff)
parent4c3160f1502e5ebad8cb73ae70cdeead2e534997 (diff)
Merge pull request #2717 from keszybz/networkctl-prettification
Networkctl prettification
Diffstat (limited to 'src/basic/ether-addr-util.h')
-rw-r--r--src/basic/ether-addr-util.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/basic/ether-addr-util.h b/src/basic/ether-addr-util.h
index 00c5159fe8..074363793e 100644
--- a/src/basic/ether-addr-util.h
+++ b/src/basic/ether-addr-util.h
@@ -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, &ETHER_ADDR_NULL);
+}