about summary refs log tree commit diff
path: root/src/core/nm-dbus-utils.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2022-01-13 22:34:27 +0100
committerMichael Biebl <biebl@debian.org>2022-01-13 22:34:27 +0100
commitdd97d276b5d70c3397a4e59c978ca5228f06ba44 (patch)
tree5fb3f5e0f5da28e39d3261d50561349a512ba297 /src/core/nm-dbus-utils.c
parent3e2f6719468f8d957ae3cb112f3cb75b9c82d6a7 (diff)
parent88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (diff)
Update upstream source from tag 'upstream/1.34.0'
Update to upstream version '1.34.0'
with Debian dir b598c27ee9cef517760bc745aa6a3bb7d9fb2ecb
Diffstat (limited to 'src/core/nm-dbus-utils.c')
-rw-r--r--src/core/nm-dbus-utils.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/core/nm-dbus-utils.c b/src/core/nm-dbus-utils.c
index d3e5612d..7f7b9fb9 100644
--- a/src/core/nm-dbus-utils.c
+++ b/src/core/nm-dbus-utils.c
@@ -97,27 +97,13 @@ nm_dbus_utils_get_property(GObject *obj, const char *signature, const char *prop
 void
 nm_dbus_utils_g_value_set_object_path(GValue *value, gpointer object)
 {
-    const char *path;
-
-    g_return_if_fail(!object || NM_IS_DBUS_OBJECT(object));
-
-    if (object && (path = nm_dbus_object_get_path(object)))
-        g_value_set_string(value, path);
-    else
-        g_value_set_string(value, NULL);
+    g_value_set_string(value, object ? nm_dbus_object_get_path(object) : NULL);
 }
 
 void
 nm_dbus_utils_g_value_set_object_path_still_exported(GValue *value, gpointer object)
 {
-    const char *path;
-
-    g_return_if_fail(!object || NM_IS_DBUS_OBJECT(object));
-
-    if (object && (path = nm_dbus_object_get_path_still_exported(object)))
-        g_value_set_string(value, path);
-    else
-        g_value_set_string(value, "/");
+    g_value_set_string(value, object ? nm_dbus_object_get_path_still_exported(object) : "/");
 }
 
 void
@@ -152,7 +138,7 @@ nm_dbus_utils_g_value_set_object_path_from_hash(
     strv[i] = NULL;
 
     /* sort the names, to give a well-defined, stable order. */
-    nm_utils_strv_sort(strv, i);
+    nm_strv_sort(strv, i);
 
     g_value_take_boxed(value, strv);
 }