summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2018-12-29 00:22:58 +0100
committerThomas Haller <thaller@redhat.com>2019-01-09 16:46:41 +0100
commit7b935c8940bec2dae19972c35011cfeb75e6f6e3 (patch)
treec37365b0433b69a989dbad8d71cd0776fc0615f2
parentfb79c79d872f941bae5603cf0832b1af7d456cce (diff)
downloadNetworkManager-7b935c8940bec2dae19972c35011cfeb75e6f6e3.tar.gz
device: use NM_IN_STRSET() in nm_connection_is_virtual()
-rw-r--r--libnm-core/nm-connection.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/libnm-core/nm-connection.c b/libnm-core/nm-connection.c
index 9e5de7b267..eca9c1dfdd 100644
--- a/libnm-core/nm-connection.c
+++ b/libnm-core/nm-connection.c
@@ -2305,23 +2305,23 @@ nm_connection_is_virtual (NMConnection *connection)
if (!type)
return FALSE;
- if ( !strcmp (type, NM_SETTING_6LOWPAN_SETTING_NAME)
- || !strcmp (type, NM_SETTING_BOND_SETTING_NAME)
- || !strcmp (type, NM_SETTING_DUMMY_SETTING_NAME)
- || !strcmp (type, NM_SETTING_TEAM_SETTING_NAME)
- || !strcmp (type, NM_SETTING_BRIDGE_SETTING_NAME)
- || !strcmp (type, NM_SETTING_VLAN_SETTING_NAME)
- || !strcmp (type, NM_SETTING_TUN_SETTING_NAME)
- || !strcmp (type, NM_SETTING_IP_TUNNEL_SETTING_NAME)
- || !strcmp (type, NM_SETTING_MACSEC_SETTING_NAME)
- || !strcmp (type, NM_SETTING_MACVLAN_SETTING_NAME)
- || !strcmp (type, NM_SETTING_OVS_BRIDGE_SETTING_NAME)
- || !strcmp (type, NM_SETTING_OVS_INTERFACE_SETTING_NAME)
- || !strcmp (type, NM_SETTING_OVS_PORT_SETTING_NAME)
- || !strcmp (type, NM_SETTING_VXLAN_SETTING_NAME))
+ if (NM_IN_STRSET (type, NM_SETTING_6LOWPAN_SETTING_NAME,
+ NM_SETTING_BOND_SETTING_NAME,
+ NM_SETTING_BRIDGE_SETTING_NAME,
+ NM_SETTING_DUMMY_SETTING_NAME,
+ NM_SETTING_IP_TUNNEL_SETTING_NAME,
+ NM_SETTING_MACSEC_SETTING_NAME,
+ NM_SETTING_MACVLAN_SETTING_NAME,
+ NM_SETTING_OVS_BRIDGE_SETTING_NAME,
+ NM_SETTING_OVS_INTERFACE_SETTING_NAME,
+ NM_SETTING_OVS_PORT_SETTING_NAME,
+ NM_SETTING_TEAM_SETTING_NAME,
+ NM_SETTING_TUN_SETTING_NAME,
+ NM_SETTING_VLAN_SETTING_NAME,
+ NM_SETTING_VXLAN_SETTING_NAME))
return TRUE;
- if (!strcmp (type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
+ if (nm_streq (type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
NMSettingInfiniband *s_ib;
s_ib = nm_connection_get_setting_infiniband (connection);