mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-15 08:00:37 +01:00
core: add some assertions to avoid clang analyzer false positives
This commit is contained in:
parent
d86a61225d
commit
4753dff29e
2 changed files with 4 additions and 0 deletions
|
|
@ -66,6 +66,8 @@ translate_mm_error (GError *error)
|
|||
{
|
||||
NMDeviceStateReason reason;
|
||||
|
||||
g_return_val_if_fail (error != NULL, NM_DEVICE_STATE_REASON_UNKNOWN);
|
||||
|
||||
if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_CARRIER))
|
||||
reason = NM_DEVICE_STATE_REASON_MODEM_NO_CARRIER;
|
||||
else if (g_error_matches (error, MM_CONNECTION_ERROR, MM_CONNECTION_ERROR_NO_DIALTONE))
|
||||
|
|
|
|||
|
|
@ -3081,6 +3081,7 @@ _activation_auth_done (NMActiveConnection *active,
|
|||
error_desc);
|
||||
}
|
||||
|
||||
g_assert (error);
|
||||
dbus_g_method_return_error (context, error);
|
||||
_internal_activation_failed (self, active, error->message);
|
||||
g_object_unref (active);
|
||||
|
|
@ -3227,6 +3228,7 @@ activation_add_done (NMSettings *self,
|
|||
error = local;
|
||||
}
|
||||
|
||||
g_assert (error);
|
||||
_internal_activation_failed (info->manager, info->active, error->message);
|
||||
dbus_g_method_return_error (context, error);
|
||||
g_clear_error (&local);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue