mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-09 06:30:21 +01:00
trivial: simplify nm_device_set_is_nm_owned()
Nothing used its return value or passed FALSE.
This commit is contained in:
parent
f3fbbf4a77
commit
4809898e08
3 changed files with 6 additions and 17 deletions
|
|
@ -4722,22 +4722,12 @@ nm_device_get_is_nm_owned (NMDevice *device)
|
|||
return NM_DEVICE_GET_PRIVATE (device)->is_nm_owned;
|
||||
}
|
||||
|
||||
gboolean
|
||||
nm_device_set_is_nm_owned (NMDevice *device,
|
||||
gboolean is_nm_owned)
|
||||
void
|
||||
nm_device_set_nm_owned (NMDevice *device)
|
||||
{
|
||||
NMDevicePrivate *priv;
|
||||
g_return_if_fail (NM_IS_DEVICE (device));
|
||||
|
||||
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
|
||||
|
||||
priv = NM_DEVICE_GET_PRIVATE (device);
|
||||
|
||||
if (is_nm_owned == priv->is_nm_owned)
|
||||
return TRUE;
|
||||
if (!is_nm_owned)
|
||||
return FALSE;
|
||||
priv->is_nm_owned = TRUE;
|
||||
return TRUE;
|
||||
NM_DEVICE_GET_PRIVATE (device)->is_nm_owned = TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -317,8 +317,7 @@ void nm_device_set_initial_unmanaged_flag (NMDevice *device,
|
|||
gboolean unmanaged);
|
||||
|
||||
gboolean nm_device_get_is_nm_owned (NMDevice *device);
|
||||
gboolean nm_device_set_is_nm_owned (NMDevice *device,
|
||||
gboolean is_nm_owned);
|
||||
void nm_device_set_nm_owned (NMDevice *device);
|
||||
|
||||
gboolean nm_device_get_autoconnect (NMDevice *device);
|
||||
|
||||
|
|
|
|||
|
|
@ -1086,7 +1086,7 @@ system_create_virtual_device (NMManager *self, NMConnection *connection)
|
|||
}
|
||||
|
||||
if (device) {
|
||||
nm_device_set_is_nm_owned (device, TRUE);
|
||||
nm_device_set_nm_owned (device);
|
||||
add_device (self, device, FALSE);
|
||||
g_object_unref (device);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue