From: Yu Watanabe Date: Mon, 23 Nov 2020 13:34:43 +0000 (+0900) Subject: network: use IN_SET() macro X-Git-Tag: v248-rc1~613^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=53ec5dd028503f48be09e936f013ff54678b2359;p=thirdparty%2Fsystemd.git network: use IN_SET() macro Follow-up for 1d370b2c182505ff8033fccbebcc56621d305220. --- 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;