all: use nm_dbus_path_not_empty()

This commit is contained in:
Thomas Haller 2019-10-24 12:29:21 +02:00
parent 88ef02ec33
commit 1463450393
3 changed files with 3 additions and 5 deletions

View file

@ -124,9 +124,7 @@ _nml_coerce_property_object_path (NMRefString *path)
{
if (!path)
return NULL;
if (nm_streq (path->str, "/"))
return NULL;
return path->str;
return nm_dbus_path_not_empty (path->str);
}
static inline const char *const*

View file

@ -209,7 +209,7 @@ nm_checkpoint_manager_destroy (NMCheckpointManager *self,
g_return_val_if_fail (path && path[0] == '/', FALSE);
g_return_val_if_fail (!error || !*error, FALSE);
if (nm_streq (path, "/")) {
if (!nm_dbus_path_not_empty (path)) {
nm_checkpoint_manager_destroy_all (self);
return TRUE;
}

View file

@ -1543,7 +1543,7 @@ p2p_props_changed_cb (GDBusProxy *proxy,
if (g_variant_lookup (changed_properties, "Group", "&o", &path)) {
if (priv->group_proxy && g_strcmp0 (path, g_dbus_proxy_get_object_path (priv->group_proxy)) == 0) {
/* We already have the proxy, nothing to do. */
} else if (path && g_strcmp0 (path, "/") != 0) {
} else if (nm_dbus_path_not_empty (path)) {
if (priv->group_proxy != NULL) {
_LOGW ("P2P: Unexpected update of the group object path");
priv->group_proxy_acquired = FALSE;