summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-05-05 09:26:58 +0200
committerThomas Haller <thaller@redhat.com>2020-05-06 08:27:18 +0200
commit643f84beae5fa2bfbda7e833223d7c2cf1c21a5b (patch)
tree4e485614a4c7eb0cb7f838f76f1781ddd27ee750
parent6d6c4354fc5e95a5b1fa18cdca92b5147af3c2d0 (diff)
downloadNetworkManager-th/config-fix-subtract-plugins.tar.gz
config: minor cleanup in _sort_groups_cmp() and _intern_config_write_sort_fcn()th/config-fix-subtract-plugins
-rw-r--r--src/nm-config.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/nm-config.c b/src/nm-config.c
index c1f052be0a..d9d1560a87 100644
--- a/src/nm-config.c
+++ b/src/nm-config.c
@@ -657,13 +657,11 @@ ignore_config_snippet (GKeyFile *keyfile, gboolean is_base_config)
static int
_sort_groups_cmp (const char **pa, const char **pb, gpointer dummy)
{
- const char *a, *b;
+ const char *a = *pa;
+ const char *b = *pb;
gboolean a_is_connection, b_is_connection;
gboolean a_is_device, b_is_device;
- a = *pa;
- b = *pb;
-
a_is_connection = NM_STR_HAS_PREFIX (a, NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION);
b_is_connection = NM_STR_HAS_PREFIX (b, NM_CONFIG_KEYFILE_GROUPPREFIX_CONNECTION);
@@ -1601,8 +1599,8 @@ out:
static int
_intern_config_write_sort_fcn (const char **a, const char **b, const char *const*atomic_section_prefixes)
{
- const char *g_a = (a ? *a : NULL);
- const char *g_b = (b ? *b : NULL);
+ const char *g_a = *a;
+ const char *g_b = *b;
gboolean a_is, b_is;
a_is = NM_STR_HAS_PREFIX (g_a, NM_CONFIG_KEYFILE_GROUPPREFIX_INTERN);