Commit 2b394d00 authored by Thomas Haller's avatar Thomas Haller
Browse files

dns-manager: use NM_IN_SET() in condition

parent fd496fd8
......@@ -792,10 +792,10 @@ build_plugin_config_lists (NMDnsManager *self,
*out_dev_configs = g_slist_append (*out_dev_configs, priv->ip6_device_config);
for (iter = priv->configs; iter; iter = g_slist_next (iter)) {
if ( (iter->data != priv->ip4_vpn_config)
&& (iter->data != priv->ip4_device_config)
&& (iter->data != priv->ip6_vpn_config)
&& (iter->data != priv->ip6_device_config))
if (!NM_IN_SET (iter->data, priv->ip4_vpn_config,
priv->ip4_device_config,
priv->ip6_vpn_config,
priv->ip6_device_config))
*out_other_configs = g_slist_append (*out_other_configs, iter->data);
}
}
......@@ -891,10 +891,10 @@ update_dns (NMDnsManager *self,
merge_one_ip6_config (&rc, priv->ip6_device_config);
for (iter = priv->configs; iter; iter = g_slist_next (iter)) {
if ( (iter->data == priv->ip4_vpn_config)
|| (iter->data == priv->ip4_device_config)
|| (iter->data == priv->ip6_vpn_config)
|| (iter->data == priv->ip6_device_config))
if (NM_IN_SET (iter->data, priv->ip4_vpn_config,
priv->ip4_device_config,
priv->ip6_vpn_config,
priv->ip6_device_config))
continue;
if (NM_IS_IP4_CONFIG (iter->data)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment