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 commit c4f655579c)
(cherry picked from commit a30b2fcd84)
This commit is contained in:
Pavel Šimerda 2018-01-17 17:39:24 +01:00 committed by Thomas Haller
parent 01d41c08a7
commit b2b28cb644

View file

@ -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);
}