mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager
synced 2024-10-06 16:21:50 +00:00
core: reorder return in find_master()
It feels ugly to set the out arguments, in case we are failing the function. Note that there is no change in behavior here. This is purely cosmetic.
This commit is contained in:
parent
44076802a9
commit
6d75b7f348
|
@ -5005,6 +5005,14 @@ find_master(NMManager *self,
|
|||
nm_device_get_iface(master_device));
|
||||
}
|
||||
|
||||
if (!master_device && !master_connection) {
|
||||
g_set_error_literal(error,
|
||||
NM_MANAGER_ERROR,
|
||||
NM_MANAGER_ERROR_UNKNOWN_DEVICE,
|
||||
"Master connection not found or invalid");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
NM_SET_OUT(out_master_connection, master_connection);
|
||||
NM_SET_OUT(out_master_device, master_device);
|
||||
if (out_master_ac && master_connection) {
|
||||
|
@ -5016,14 +5024,6 @@ find_master(NMManager *self,
|
|||
NULL);
|
||||
}
|
||||
|
||||
if (!master_device && !master_connection) {
|
||||
g_set_error_literal(error,
|
||||
NM_MANAGER_ERROR,
|
||||
NM_MANAGER_ERROR_UNKNOWN_DEVICE,
|
||||
"Master connection not found or invalid");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue