mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 13:30:20 +01:00
dns: use NM_STR_HAS_SUFFIX() instead of g_str_has_suffix()
It translates to a plain memcmp() as the argument is a string literal.
This commit is contained in:
parent
b4338de984
commit
601605dbea
1 changed files with 2 additions and 1 deletions
|
|
@ -2128,7 +2128,8 @@ nm_dns_manager_set_hostname(NMDnsManager *self, const char *hostname, gboolean s
|
|||
|
||||
/* Certain hostnames we don't want to include in resolv.conf 'searches' */
|
||||
if (hostname && nm_utils_is_specific_hostname(hostname)
|
||||
&& !g_str_has_suffix(hostname, ".in-addr.arpa") && !nm_inet_is_valid(AF_UNSPEC, hostname)) {
|
||||
&& !NM_STR_HAS_SUFFIX(hostname, ".in-addr.arpa")
|
||||
&& !nm_inet_is_valid(AF_UNSPEC, hostname)) {
|
||||
domain = strchr(hostname, '.');
|
||||
if (domain) {
|
||||
domain++;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue