summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/devices/nm-device-bond.c2
-rw-r--r--src/core/devices/nm-device.c14
-rw-r--r--src/core/devices/wifi/nm-device-iwd.c2
-rw-r--r--src/core/devices/wifi/nm-device-wifi-p2p.c4
-rw-r--r--src/core/devices/wifi/nm-device-wifi.c2
-rw-r--r--src/core/devices/wwan/nm-modem.c2
-rw-r--r--src/core/dhcp/nm-dhcp-helper.c4
-rw-r--r--src/core/nm-dbus-manager.c2
-rw-r--r--src/core/nm-manager.c2
-rw-r--r--src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c2
-rw-r--r--src/core/settings/plugins/keyfile/nms-keyfile-plugin.c2
-rw-r--r--src/core/supplicant/nm-supplicant-interface.c6
12 files changed, 22 insertions, 22 deletions
diff --git a/src/core/devices/nm-device-bond.c b/src/core/devices/nm-device-bond.c
index 21fe9b07eb..565171f551 100644
--- a/src/core/devices/nm-device-bond.c
+++ b/src/core/devices/nm-device-bond.c
@@ -175,7 +175,7 @@ update_connection(NMDevice *device, NMConnection *connection)
gs_free char *value = NULL;
char *p;
- if (NM_IN_STRSET(option, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE))
+ if (nm_streq(option, NM_SETTING_BOND_OPTION_ACTIVE_SLAVE))
continue;
value =
diff --git a/src/core/devices/nm-device.c b/src/core/devices/nm-device.c
index 6cc823b2ee..80350b4834 100644
--- a/src/core/devices/nm-device.c
+++ b/src/core/devices/nm-device.c
@@ -8862,8 +8862,8 @@ unmanaged_on_quit(NMDevice *self)
/* the only exception are IPv4 shared connections. We unmanage them on quit. */
connection = nm_device_get_applied_connection(self);
if (connection) {
- if (NM_IN_STRSET(nm_utils_get_ip_config_method(connection, AF_INET),
- NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
+ if (nm_streq(nm_utils_get_ip_config_method(connection, AF_INET),
+ NM_SETTING_IP4_CONFIG_METHOD_SHARED)) {
/* shared connections are to be unmangaed. */
return TRUE;
}
@@ -11866,9 +11866,9 @@ activate_stage3_ip_config_for_addr_family(NMDevice *self, int addr_family, const
} else {
_dev_ipll6_start(self);
- if (NM_IN_STRSET(method, NM_SETTING_IP6_CONFIG_METHOD_AUTO))
+ if (nm_streq(method, NM_SETTING_IP6_CONFIG_METHOD_AUTO))
_dev_ipac6_start(self);
- else if (NM_IN_STRSET(method, NM_SETTING_IP6_CONFIG_METHOD_SHARED))
+ else if (nm_streq(method, NM_SETTING_IP6_CONFIG_METHOD_SHARED))
_dev_ipshared6_start(self);
else if (nm_streq(method, NM_SETTING_IP6_CONFIG_METHOD_DHCP)) {
priv->ipdhcp_data_6.v6.mode = NM_NDISC_DHCP_LEVEL_MANAGED;
@@ -16595,7 +16595,7 @@ _hw_addr_get_cloned(NMDevice *self,
}
addr_out = g_strdup(addr);
type_out = HW_ADDR_TYPE_PERMANENT;
- } else if (NM_IN_STRSET(addr, NM_CLONED_MAC_RANDOM)) {
+ } else if (nm_streq(addr, NM_CLONED_MAC_RANDOM)) {
if (priv->hw_addr_type == HW_ADDR_TYPE_GENERATED) {
/* hm, we already use a generate MAC address. Most certainly, that is from the same
* activation request, so we should not create a new random address, instead keep
@@ -16616,7 +16616,7 @@ _hw_addr_get_cloned(NMDevice *self,
addr_out = g_steal_pointer(&hw_addr_generated);
type_out = HW_ADDR_TYPE_GENERATED;
- } else if (NM_IN_STRSET(addr, NM_CLONED_MAC_STABLE)) {
+ } else if (nm_streq(addr, NM_CLONED_MAC_STABLE)) {
NMUtilsStableType stable_type;
const char *stable_id;
@@ -17089,7 +17089,7 @@ nm_device_get_hostname_from_dns_lookup(NMDevice *self, int addr_family, gboolean
method = nm_device_get_effective_ip_config_method(self, addr_family);
if (IS_IPv4) {
- if (NM_IN_STRSET(method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
+ if (nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)) {
nm_clear_pointer(&priv->hostname_resolver_x[IS_IPv4], _hostname_resolver_free);
NM_SET_OUT(out_wait, FALSE);
return NULL;
diff --git a/src/core/devices/wifi/nm-device-iwd.c b/src/core/devices/wifi/nm-device-iwd.c
index ab37cbec91..bb01c1c674 100644
--- a/src/core/devices/wifi/nm-device-iwd.c
+++ b/src/core/devices/wifi/nm-device-iwd.c
@@ -2826,7 +2826,7 @@ state_changed(NMDeviceIwd *self, const char *new_state)
/* Don't allow new connection until iwd exits disconnecting and no
* Connect callback is pending.
*/
- if (!priv->iwd_autoconnect && NM_IN_STRSET(new_state, "disconnected")) {
+ if (!priv->iwd_autoconnect && nm_streq(new_state, "disconnected")) {
priv->nm_autoconnect = TRUE;
if (!can_connect)
nm_device_emit_recheck_auto_activate(device);
diff --git a/src/core/devices/wifi/nm-device-wifi-p2p.c b/src/core/devices/wifi/nm-device-wifi-p2p.c
index 4576af95cb..5c5a1fc724 100644
--- a/src/core/devices/wifi/nm-device-wifi-p2p.c
+++ b/src/core/devices/wifi/nm-device-wifi-p2p.c
@@ -567,7 +567,7 @@ act_stage3_ip_config(NMDevice *device, int addr_family)
method = nm_utils_get_ip_config_method(connection, addr_family);
/* We may have an address assigned by the group owner */
- if (IS_IPv4 && NM_IN_STRSET(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) && priv->group_iface
+ if (IS_IPv4 && nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO) && priv->group_iface
&& !nm_supplicant_interface_get_p2p_group_owner(priv->group_iface)) {
in_addr_t addr;
guint8 plen;
@@ -591,7 +591,7 @@ act_stage3_ip_config(NMDevice *device, int addr_family)
}
if (IS_IPv4)
- indicate_addressing_running = NM_IN_STRSET(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
+ indicate_addressing_running = nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
else {
indicate_addressing_running = NM_IN_STRSET(method,
NM_SETTING_IP6_CONFIG_METHOD_AUTO,
diff --git a/src/core/devices/wifi/nm-device-wifi.c b/src/core/devices/wifi/nm-device-wifi.c
index 39c68d777f..45c9e32205 100644
--- a/src/core/devices/wifi/nm-device-wifi.c
+++ b/src/core/devices/wifi/nm-device-wifi.c
@@ -3399,7 +3399,7 @@ act_stage3_ip_config(NMDevice *device, int addr_family)
method = nm_utils_get_ip_config_method(nm_device_get_applied_connection(device), addr_family);
if (NM_IS_IPv4(addr_family))
- indicate_addressing_running = NM_IN_STRSET(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
+ indicate_addressing_running = nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_AUTO);
else {
indicate_addressing_running = NM_IN_STRSET(method,
NM_SETTING_IP6_CONFIG_METHOD_AUTO,
diff --git a/src/core/devices/wwan/nm-modem.c b/src/core/devices/wwan/nm-modem.c
index a5ee8ce8ed..63a3e497ef 100644
--- a/src/core/devices/wwan/nm-modem.c
+++ b/src/core/devices/wwan/nm-modem.c
@@ -721,7 +721,7 @@ _stage3_ip_config_start_on_idle(NMModem *self, int addr_family)
method = nm_utils_get_ip_config_method(connection, addr_family);
- if (IS_IPv4 ? NM_IN_STRSET(method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)
+ if (IS_IPv4 ? nm_streq(method, NM_SETTING_IP4_CONFIG_METHOD_DISABLED)
: NM_IN_STRSET(method,
NM_SETTING_IP6_CONFIG_METHOD_IGNORE,
NM_SETTING_IP6_CONFIG_METHOD_DISABLED)) {
diff --git a/src/core/dhcp/nm-dhcp-helper.c b/src/core/dhcp/nm-dhcp-helper.c
index 5a17f4e8ab..e85e9864cb 100644
--- a/src/core/dhcp/nm-dhcp-helper.c
+++ b/src/core/dhcp/nm-dhcp-helper.c
@@ -182,13 +182,13 @@ do_notify:
s_err = g_dbus_error_get_remote_error(error);
- if (NM_IN_STRSET(s_err, "org.freedesktop.NetworkManager.Device.Failed")) {
+ if (nm_streq(s_err, "org.freedesktop.NetworkManager.Device.Failed")) {
_LOGi("notify failed with reason: %s", error->message);
success = FALSE;
goto out;
}
- if (!NM_IN_STRSET(s_err, "org.freedesktop.DBus.Error.UnknownMethod")) {
+ if (!nm_streq(s_err, "org.freedesktop.DBus.Error.UnknownMethod")) {
/* Some unexpected error. We treat that as a failure. In particular,
* the daemon will fail the request if ACD fails. This causes nm-dhcp-helper
* to fail, which in turn causes dhclient to send a DECLINE. */
diff --git a/src/core/nm-dbus-manager.c b/src/core/nm-dbus-manager.c
index 7fcbf6cad8..0d499651a3 100644
--- a/src/core/nm-dbus-manager.c
+++ b/src/core/nm-dbus-manager.c
@@ -314,7 +314,7 @@ private_server_allow_mechanism(GDBusAuthObserver *observer,
const char *mechanism,
gpointer user_data)
{
- return NM_IN_STRSET(mechanism, "EXTERNAL");
+ return nm_streq(mechanism, "EXTERNAL");
}
static void
diff --git a/src/core/nm-manager.c b/src/core/nm-manager.c
index 3af24aa00b..48d5198053 100644
--- a/src/core/nm-manager.c
+++ b/src/core/nm-manager.c
@@ -7439,7 +7439,7 @@ _dbus_set_property_audit_log_get_args(NMDBusObject *obj,
property_name,
g_variant_get_boolean(value) ? "on" : "off"));
}
- if (NM_IN_STRSET(property_name, NM_MANAGER_GLOBAL_DNS_CONFIGURATION)) {
+ if (nm_streq(property_name, NM_MANAGER_GLOBAL_DNS_CONFIGURATION)) {
return NM_MANAGER_GLOBAL_DNS_CONFIGURATION;
}
diff --git a/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c b/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
index 9fdae4bd25..fe1945aa72 100644
--- a/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
+++ b/src/core/settings/plugins/ifcfg-rh/tests/test-ifcfg-rh.c
@@ -9146,7 +9146,7 @@ _svUnescape(const char *str, char **to_free)
g_assert(!to_free2);
g_assert_cmpstr(s, ==, "");
g_assert(!*to_free);
- } else if (NM_IN_STRSET(str, "$'x\\U0'")) {
+ } else if (nm_streq(str, "$'x\\U0'")) {
g_assert_cmpstr(s2, ==, NULL);
g_assert(!to_free2);
g_assert_cmpstr(s, ==, "x");
diff --git a/src/core/settings/plugins/keyfile/nms-keyfile-plugin.c b/src/core/settings/plugins/keyfile/nms-keyfile-plugin.c
index 1d7de8d24b..fb832f7d17 100644
--- a/src/core/settings/plugins/keyfile/nms-keyfile-plugin.c
+++ b/src/core/settings/plugins/keyfile/nms-keyfile-plugin.c
@@ -1267,7 +1267,7 @@ nms_keyfile_plugin_init(NMSKeyfilePlugin *plugin)
/* no duplicates */
if (NM_IN_STRSET(priv->dirname_libs[0], priv->dirname_etc, priv->dirname_run))
nm_clear_g_free(&priv->dirname_libs[0]);
- if (NM_IN_STRSET(priv->dirname_etc, priv->dirname_run))
+ if (nm_streq(priv->dirname_etc, priv->dirname_run))
nm_clear_g_free(&priv->dirname_etc);
nm_assert(!priv->dirname_libs[0] || priv->dirname_libs[0][0] == '/');
diff --git a/src/core/supplicant/nm-supplicant-interface.c b/src/core/supplicant/nm-supplicant-interface.c
index fa8b4e3713..0cc56669de 100644
--- a/src/core/supplicant/nm-supplicant-interface.c
+++ b/src/core/supplicant/nm-supplicant-interface.c
@@ -293,7 +293,7 @@ security_from_vardict(GVariant *security)
flags |= NM_802_11_AP_SEC_KEY_MGMT_802_1X;
else if (NM_IN_STRSET(v, "sae", "ft-sae"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_SAE;
- else if (NM_IN_STRSET(v, "owe"))
+ else if (nm_streq(v, "owe"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_OWE;
else if (NM_IN_STRSET(v, "wpa-eap-suite-b-192", "wpa-ft-eap-sha384"))
flags |= NM_802_11_AP_SEC_KEY_MGMT_EAP_SUITE_B_192;
@@ -303,9 +303,9 @@ security_from_vardict(GVariant *security)
if (g_variant_lookup(security, "Pairwise", "^a&s", &array)) {
for (i = 0; (v = array[i]); i++) {
- if (NM_IN_STRSET(v, "tkip"))
+ if (nm_streq(v, "tkip"))
flags |= NM_802_11_AP_SEC_PAIR_TKIP;
- else if (NM_IN_STRSET(v, "ccmp"))
+ else if (nm_streq(v, "ccmp"))
flags |= NM_802_11_AP_SEC_PAIR_CCMP;
}
g_free(array);