From 53ec5dd028503f48be09e936f013ff54678b2359 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Mon, 23 Nov 2020 22:34:43 +0900 Subject: [PATCH] network: use IN_SET() macro Follow-up for 1d370b2c182505ff8033fccbebcc56621d305220. --- src/network/networkd-dhcp-common.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/network/networkd-dhcp-common.c b/src/network/networkd-dhcp-common.c index c338c775a72..904cb34d132 100644 --- a/src/network/networkd-dhcp-common.c +++ b/src/network/networkd-dhcp-common.c @@ -62,11 +62,9 @@ static struct DUID fallback_duid = { .type = DUID_TYPE_EN }; DUID* link_get_duid(Link *link) { if (link->network->duid.type != _DUID_TYPE_INVALID) return &link->network->duid; - else if (link->hw_addr.length == 0 && - (link->manager->duid.type == DUID_TYPE_LLT || - link->manager->duid.type == DUID_TYPE_LL)) - /* Fallback to DUID that works without mac addresses. - * This is useful for tunnel devices without mac address. */ + else if (link->hw_addr.length == 0 && IN_SET(link->manager->duid.type, DUID_TYPE_LLT, DUID_TYPE_LL)) + /* Fallback to DUID that works without MAC address. + * This is useful for tunnel devices without MAC address. */ return &fallback_duid; else return &link->manager->duid; -- 2.47.3