mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-31 14:50:10 +01:00
libnm-core: don't set GError on invalid @connection argument in _nm_connection_verify()
In general, we don't set errors if passing a completely invalid @self pointer to a method. We usually also don't set the error argument when asserting. So, just drop it. Signed-off-by: Thomas Haller <thaller@redhat.com>
This commit is contained in:
parent
1effc604cb
commit
b87ed28f01
1 changed files with 2 additions and 10 deletions
|
|
@ -671,16 +671,8 @@ _nm_connection_verify (NMConnection *connection, GError **error)
|
|||
GError *normalizable_error = NULL;
|
||||
NMSettingVerifyResult normalizable_error_type = NM_SETTING_VERIFY_SUCCESS;
|
||||
|
||||
if (error)
|
||||
g_return_val_if_fail (*error == NULL, NM_SETTING_VERIFY_ERROR);
|
||||
|
||||
if (!NM_IS_CONNECTION (connection)) {
|
||||
g_set_error_literal (error,
|
||||
NM_SETTING_CONNECTION_ERROR,
|
||||
NM_SETTING_CONNECTION_ERROR_UNKNOWN,
|
||||
"invalid connection; failed verification");
|
||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), NM_SETTING_VERIFY_ERROR);
|
||||
}
|
||||
g_return_val_if_fail (NM_IS_CONNECTION (connection), NM_SETTING_VERIFY_ERROR);
|
||||
g_return_val_if_fail (!error || !*error, NM_SETTING_VERIFY_ERROR);
|
||||
|
||||
priv = NM_CONNECTION_GET_PRIVATE (connection);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue