mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-03-03 03:10:35 +01: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.
(cherry picked from commit 6d75b7f348)
This commit is contained in:
parent
8e0a61d4e2
commit
16263015cb
1 changed files with 8 additions and 8 deletions
|
|
@ -4516,6 +4516,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) {
|
||||
|
|
@ -4527,14 +4535,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…
Add table
Reference in a new issue