diff options
| author | Michael Biebl <biebl@debian.org> | 2024-01-25 09:46:18 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2024-01-25 09:46:18 +0100 |
| commit | 70e18d99b8e3e77bb37e218d7ac582130156f8ef (patch) | |
| tree | d40c587e6d3f0e094ff558e415f1bb9803643214 /src/core/nm-config.c | |
| parent | d4d8b2b91f7ba000d97a8b2aab48c85000c11314 (diff) | |
New upstream version 1.45.90 upstream/1.45.90
Diffstat (limited to 'src/core/nm-config.c')
| -rw-r--r-- | src/core/nm-config.c | 8 |
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); } /*****************************************************************************/ |