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

View file

@ -1333,7 +1333,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);
}
@ -1358,7 +1358,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);
}
@ -1383,7 +1383,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);
}