mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-28 00:30:36 +01:00
core/team: avoid g_return_val_if_reached() when if_fail() is appropriate
This is nicer.
This commit is contained in:
parent
6484318fe9
commit
7442a8296c
1 changed files with 2 additions and 4 deletions
|
|
@ -663,8 +663,7 @@ teamd_start(NMDeviceTeam *self)
|
|||
|
||||
connection = nm_device_get_applied_connection(NM_DEVICE(self));
|
||||
s_team = nm_connection_get_setting_team(connection);
|
||||
if (!s_team)
|
||||
g_return_val_if_reached(FALSE);
|
||||
g_return_val_if_fail(s_team, FALSE);
|
||||
|
||||
nm_assert(iface);
|
||||
|
||||
|
|
@ -782,8 +781,7 @@ act_stage1_prepare(NMDevice *device, NMDeviceStateReason *out_failure_reason)
|
|||
}
|
||||
|
||||
s_team = nm_device_get_applied_setting(device, NM_TYPE_SETTING_TEAM);
|
||||
if (!s_team)
|
||||
g_return_val_if_reached(NM_ACT_STAGE_RETURN_FAILURE);
|
||||
g_return_val_if_fail(s_team, FALSE);
|
||||
|
||||
if (priv->stage1_state == NM_DEVICE_STAGE_STATE_PENDING)
|
||||
return NM_ACT_STAGE_RETURN_POSTPONE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue