nm-connection.c: replace !strcmp() expressions by nm_streq()

This commit is contained in:
Olivier Gayot 2022-05-07 14:16:43 +02:00 committed by Thomas Haller
parent 452158a036
commit 24d8980692
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -3168,21 +3168,21 @@ nm_connection_get_virtual_device_description(NMConnection *connection)
iface = nm_connection_get_interface_name(connection);
if (!strcmp(type, NM_SETTING_BOND_SETTING_NAME))
if (nm_streq(type, NM_SETTING_BOND_SETTING_NAME))
display_type = _("Bond");
else if (!strcmp(type, NM_SETTING_TEAM_SETTING_NAME))
else if (nm_streq(type, NM_SETTING_TEAM_SETTING_NAME))
display_type = _("Team");
else if (!strcmp(type, NM_SETTING_BRIDGE_SETTING_NAME))
else if (nm_streq(type, NM_SETTING_BRIDGE_SETTING_NAME))
display_type = _("Bridge");
else if (!strcmp(type, NM_SETTING_VLAN_SETTING_NAME))
else if (nm_streq(type, NM_SETTING_VLAN_SETTING_NAME))
display_type = _("VLAN");
else if (!strcmp(type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
else if (nm_streq(type, NM_SETTING_INFINIBAND_SETTING_NAME)) {
display_type = _("InfiniBand");
iface = nm_setting_infiniband_get_virtual_interface_name(
nm_connection_get_setting_infiniband(connection));
} else if (!strcmp(type, NM_SETTING_IP_TUNNEL_SETTING_NAME))
} else if (nm_streq(type, NM_SETTING_IP_TUNNEL_SETTING_NAME))
display_type = _("IP Tunnel");
else if (!strcmp(type, NM_SETTING_WIREGUARD_SETTING_NAME))
else if (nm_streq(type, NM_SETTING_WIREGUARD_SETTING_NAME))
display_type = _("WireGuard");
if (!iface || !display_type)