about summary refs log tree commit diff
path: root/src/core/nm-config.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2024-01-25 09:46:52 +0100
committerMichael Biebl <biebl@debian.org>2024-01-25 09:46:52 +0100
commitb6357ff41de179d0aa2e35a6d574e5749fe09002 (patch)
treeff038e98f4569fa3ba217266e6d288410ed84cd4 /src/core/nm-config.c
parent535ecf92edd8ad054ae8102a224c3dd8f3acf967 (diff)
parent70e18d99b8e3e77bb37e218d7ac582130156f8ef (diff)
Update upstream source from tag 'upstream/1.45.90'
Update to upstream version '1.45.90'
with Debian dir d723a85d75b9a8958dee17b97673a3fd9a80e18c
Diffstat (limited to 'src/core/nm-config.c')
-rw-r--r--src/core/nm-config.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/nm-config.c b/src/core/nm-config.c
index b8df41b7..5db4a92a 100644
--- a/src/core/nm-config.c
+++ b/src/core/nm-config.c
@@ -858,7 +858,6 @@ static const ConfigGroup config_groups[] = {
                              NM_CONFIG_KEYFILE_KEY_MAIN_NO_AUTO_DEFAULT,
                              NM_CONFIG_KEYFILE_KEY_MAIN_PLUGINS,
                              NM_CONFIG_KEYFILE_KEY_MAIN_RC_MANAGER,
-                             NM_CONFIG_KEYFILE_KEY_MAIN_SLAVES_ORDER,
                              NM_CONFIG_KEYFILE_KEY_MAIN_SYSTEMD_RESOLVED, ),
     },
     {
@@ -1129,12 +1128,12 @@ read_config(GKeyFile   *keyfile,
                     /* merge the string lists, by omitting duplicates. */
 
                     for (iter_val = old_val; iter_val && *iter_val; iter_val++) {
-                        if (last_char != '-' || nm_strv_find_first(new_val, -1, *iter_val) < 0)
+                        if (last_char != '-' || !nm_strv_contains(new_val, -1, *iter_val))
                             g_ptr_array_add(new, g_strdup(*iter_val));
                     }
                     for (iter_val = new_val; iter_val && *iter_val; iter_val++) {
                         /* don't add duplicates. That means an "option=a,b"; "option+=a,c" results in "option=a,b,c" */
-                        if (last_char == '+' && nm_strv_find_first(old_val, -1, *iter_val) < 0)
+                        if (last_char == '+' && !nm_strv_contains(old_val, -1, *iter_val))
                             g_ptr_array_add(new, *iter_val);
                         else
                             g_free(*iter_val);
@@ -3019,8 +3018,7 @@ set_property(GObject *object, guint prop_id, const GValue *value, GParamSpec *ps
 gboolean
 nm_config_kernel_command_line_nm_debug(void)
 {
-    return (nm_strv_find_first(nm_utils_proc_cmdline_split(), -1, NM_CONFIG_KERNEL_CMDLINE_NM_DEBUG)
-            >= 0);
+    return nm_strv_contains(nm_utils_proc_cmdline_split(), -1, NM_CONFIG_KERNEL_CMDLINE_NM_DEBUG);
 }
 
 /*****************************************************************************/