summaryrefslogtreecommitdiff
path: root/src/libsystemd-network/sd-ipv4acd.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-05-22 14:26:06 +0200
committerLennart Poettering <lennart@poettering.net>2016-05-22 14:26:06 +0200
commite78f9587abfe03ae49acb388becb64c8353a6cb2 (patch)
tree48788ce4f7d5513ed03c55c5ad8f0904cecdea65 /src/libsystemd-network/sd-ipv4acd.c
parent2d3e72365747259ba990fa380689e24f1fdd2a93 (diff)
sd-ipv4acd: do not define ether_addr_is_nul() redundantly
we already have ether_addr_is_null() in ether-addr-util.h, let's use it here, too.
Diffstat (limited to 'src/libsystemd-network/sd-ipv4acd.c')
-rw-r--r--src/libsystemd-network/sd-ipv4acd.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/libsystemd-network/sd-ipv4acd.c b/src/libsystemd-network/sd-ipv4acd.c
index c336c6a62d..68563ad423 100644
--- a/src/libsystemd-network/sd-ipv4acd.c
+++ b/src/libsystemd-network/sd-ipv4acd.c
@@ -28,6 +28,7 @@
#include "alloc-util.h"
#include "arp-util.h"
+#include "ether-addr-util.h"
#include "fd-util.h"
#include "in-addr-util.h"
#include "list.h"
@@ -472,14 +473,6 @@ int sd_ipv4acd_is_running(sd_ipv4acd *ll) {
return ll->state != IPV4ACD_STATE_INIT;
}
-static bool ether_addr_is_nul(const struct ether_addr *addr) {
- const struct ether_addr nul_addr = {};
-
- assert(addr);
-
- return memcmp(addr, &nul_addr, sizeof(struct ether_addr)) == 0;
-}
-
int sd_ipv4acd_start(sd_ipv4acd *ll) {
int r;
@@ -487,7 +480,7 @@ int sd_ipv4acd_start(sd_ipv4acd *ll) {
assert_return(ll->event, -EINVAL);
assert_return(ll->index > 0, -EINVAL);
assert_return(ll->address != 0, -EINVAL);
- assert_return(!ether_addr_is_nul(&ll->mac_addr), -EINVAL);
+ assert_return(!ether_addr_is_null(&ll->mac_addr), -EINVAL);
assert_return(ll->state == IPV4ACD_STATE_INIT, -EBUSY);
ll->defend_window = 0;