summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-05-03 16:53:15 +0200
committerThomas Haller <thaller@redhat.com>2018-05-03 16:58:39 +0200
commitdbf574e205cdd73b5e4bddc95da0b54d1a19e64b (patch)
tree56e2a2a992a44ba40978542b7d38627dc971ab41
parent078d92f6cb39ffc9313c10fb52b6af947edfeeab (diff)
downloadNetworkManager-bg/dns-bgo746422.tar.gz
fixup! dns: use dns-priority to provide a preprocessed domain list to pluginsbg/dns-bgo746422
It's not really the MAX(). It's (num_searches ?: num_domains).
-rw-r--r--src/dns/nm-dns-manager.c4
1 files 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