summaryrefslogtreecommitdiff
path: root/src/ppp
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-12-12 17:11:34 +0100
committerThomas Haller <thaller@redhat.com>2018-12-13 09:16:32 +0100
commitb16e09a707fd836cf1ea4ed34422158c8408d94f (patch)
tree945c8425f8f86c15c7665ce3010c4258c43de395 /src/ppp
parent589063db3b08a5899eae1e6c84eb68bd309d2736 (diff)
downloadNetworkManager-b16e09a707fd836cf1ea4ed34422158c8408d94f.tar.gz
core: use streq() instead of strcmp() for comparing ip-config methods
Refactor some code to use nm_streq() and NM_IN_STRSET() instead of strcmp(). Note that nm_utils_get_ip_config_method() never returns %NULL (not even with g_return*() assertion failures). nm_streq() is sufficent.
Diffstat (limited to 'src/ppp')
-rw-r--r--src/ppp/nm-ppp-manager.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ppp/nm-ppp-manager.c b/src/ppp/nm-ppp-manager.c
index 1524591a83..d8fdbab20f 100644
--- a/src/ppp/nm-ppp-manager.c
+++ b/src/ppp/nm-ppp-manager.c
@@ -1031,9 +1031,9 @@ _ppp_manager_start (NMPPPManager *self,
/* Figure out what address methods should be enabled */
ip4_method = nm_utils_get_ip_config_method (connection, AF_INET);
- ip4_enabled = g_strcmp0 (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) == 0;
+ ip4_enabled = nm_streq (ip4_method, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
ip6_method = nm_utils_get_ip_config_method (connection, AF_INET6);
- ip6_enabled = g_strcmp0 (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO) == 0;
+ ip6_enabled = nm_streq (ip6_method, NM_SETTING_IP6_CONFIG_METHOD_AUTO);
ppp_cmd = create_pppd_cmd_line (self,
s_ppp,