mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-27 19:50:08 +01:00
libnm: fix empty statements that were supposed to return NULL
Discovered thanks to `-Wunused-value` when building on openSUSE Leap 42.3. (cherry picked from commitc4f655579c) (cherry picked from commita30b2fcd84)
This commit is contained in:
parent
01d41c08a7
commit
b2b28cb644
1 changed files with 3 additions and 3 deletions
|
|
@ -1336,7 +1336,7 @@ nm_client_get_connection_by_id (NMClient *client, const char *id)
|
|||
g_return_val_if_fail (id != NULL, NULL);
|
||||
|
||||
if (!nm_client_get_nm_running (client))
|
||||
NULL;
|
||||
return NULL;
|
||||
|
||||
return nm_remote_settings_get_connection_by_id (NM_CLIENT_GET_PRIVATE (client)->settings, id);
|
||||
}
|
||||
|
|
@ -1361,7 +1361,7 @@ nm_client_get_connection_by_path (NMClient *client, const char *path)
|
|||
g_return_val_if_fail (path != NULL, NULL);
|
||||
|
||||
if (!nm_client_get_nm_running (client))
|
||||
NULL;
|
||||
return NULL;
|
||||
|
||||
return nm_remote_settings_get_connection_by_path (NM_CLIENT_GET_PRIVATE (client)->settings, path);
|
||||
}
|
||||
|
|
@ -1386,7 +1386,7 @@ nm_client_get_connection_by_uuid (NMClient *client, const char *uuid)
|
|||
g_return_val_if_fail (uuid != NULL, NULL);
|
||||
|
||||
if (!nm_client_get_nm_running (client))
|
||||
NULL;
|
||||
return NULL;
|
||||
|
||||
return nm_remote_settings_get_connection_by_uuid (NM_CLIENT_GET_PRIVATE (client)->settings, uuid);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue