diff options
| author | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-02-03 09:24:19 -0500 |
|---|---|---|
| committer | Jeremy Bicha <jeremy.bicha@canonical.com> | 2022-02-03 12:01:26 -0500 |
| commit | 240934659cd8326a14324c73d4f0f88eecfddcab (patch) | |
| tree | e07cde48aa0a143bebf10ca7103cc0e69febad25 /src/core/nm-dbus-utils.c | |
| parent | fbe61ddadf4a89800a8e3651ae91099259ddf2ad (diff) | |
| parent | 1628eda029ba4dede8d4d45572c6b60367882436 (diff) | |
Merge tag 'debian/1.34.0-2' into ubuntu/master
network-manager Debian release 1.34.0-2
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); } |