Commit 4809898e authored by Dan Williams's avatar Dan Williams

trivial: simplify nm_device_set_is_nm_owned()

Nothing used its return value or passed FALSE.
parent f3fbbf4a
......@@ -4722,22 +4722,12 @@ nm_device_get_is_nm_owned (NMDevice *device)
return NM_DEVICE_GET_PRIVATE (device)->is_nm_owned;
nm_device_set_is_nm_owned (NMDevice *device,
gboolean is_nm_owned)
nm_device_set_nm_owned (NMDevice *device)
NMDevicePrivate *priv;
g_return_val_if_fail (NM_IS_DEVICE (device), FALSE);
priv = NM_DEVICE_GET_PRIVATE (device);
g_return_if_fail (NM_IS_DEVICE (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);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment