mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-07 08:40:59 +00:00
all: use nm_dbus_path_not_empty()
This commit is contained in:
parent
88ef02ec33
commit
1463450393
|
@ -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*
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue