1
0
mirror of https://github.com/systemd/systemd.git synced 2025-03-24 14:50:17 +03:00

networkctl: use ETHER_ADDR_NULL in one more place

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-03-02 15:43:30 -05:00
parent b3ad5fa944
commit 72e551f40b

View File

@ -147,7 +147,6 @@ static int link_info_compare(const void *a, const void *b) {
}
static int decode_link(sd_netlink_message *m, LinkInfo *info) {
static const struct ether_addr null_address = {};
const char *name;
uint16_t type;
int r;
@ -178,7 +177,7 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info) {
info->has_mac_address =
sd_netlink_message_read_ether_addr(m, IFLA_ADDRESS, &info->mac_address) >= 0 &&
memcmp(&info->mac_address, &null_address, sizeof(struct ether_addr)) != 0;
memcmp(&info->mac_address, &ETHER_ADDR_NULL, sizeof(struct ether_addr)) != 0;
info->has_mtu =
sd_netlink_message_read_u32(m, IFLA_MTU, &info->mtu) &&