diff options
| author | Michael Biebl <biebl@debian.org> | 2022-01-13 22:30:39 +0100 |
|---|---|---|
| committer | Michael Biebl <biebl@debian.org> | 2022-01-13 22:30:39 +0100 |
| commit | 88c227d90a6b7b388c5c85d72802a0ca8f05ed5c (patch) | |
| tree | 71f32df6617802270e8a78574bd8e1637dc532f4 /src/core/nm-dbus-utils.c | |
| parent | e74c568b07b50b97873fb4ee1d776dedefbd54d6 (diff) | |
New upstream version 1.34.0 upstream/1.34.0
Diffstat (limited to 'src/core/nm-dbus-utils.c')
| -rw-r--r-- | src/core/nm-dbus-utils.c | 20 |
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); } |