From dbf574e205cdd73b5e4bddc95da0b54d1a19e64b Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 3 May 2018 16:53:15 +0200 Subject: fixup! dns: use dns-priority to provide a preprocessed domain list to plugins It's not really the MAX(). It's (num_searches ?: num_domains). --- src/dns/nm-dns-manager.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/dns/nm-dns-manager.c b/src/dns/nm-dns-manager.c index e5dac09400..cec56602d7 100644 --- a/src/dns/nm-dns-manager.c +++ b/src/dns/nm-dns-manager.c @@ -1253,8 +1253,8 @@ rebuild_domain_lists (NMDnsManager *self) priority = nm_ip_config_get_dns_priority (ip_config); nm_assert (priority != 0); domains = g_new0 (const char *, - 2 + NM_MAX (nm_ip_config_get_num_searches (ip_config), - nm_ip_config_get_num_domains (ip_config))); + 2 + ( nm_ip_config_get_num_searches (ip_config) + ?: nm_ip_config_get_num_domains (ip_config))); /* Add wildcard lookup domain to connections with the default route. * If there is no default route, add the wildcard domain to all non-VPN -- cgit v1.2.1