mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 02:50:17 +01:00
trivial: annotate/adjust some code to appease Coverity
This commit is contained in:
parent
a7249cc619
commit
e9fe63cdaa
3 changed files with 10 additions and 10 deletions
|
|
@ -920,7 +920,7 @@ nmc_team_check_config (const char *config, char **out_config, GError **error)
|
|||
|
||||
/* 'config' can be either a file name or raw JSON config data */
|
||||
if (g_file_test (config, G_FILE_TEST_EXISTS))
|
||||
g_file_get_contents (config, &contents, NULL, NULL);
|
||||
(void) g_file_get_contents (config, &contents, NULL, NULL);
|
||||
else
|
||||
contents = g_strdup (config);
|
||||
|
||||
|
|
|
|||
|
|
@ -662,7 +662,7 @@ nm_remote_settings_load_connections (NMRemoteSettings *settings,
|
|||
{
|
||||
NMRemoteSettingsPrivate *priv;
|
||||
char **my_failures = NULL;
|
||||
gboolean ret = FALSE;
|
||||
gboolean ret;
|
||||
|
||||
g_return_val_if_fail (NM_IS_REMOTE_SETTINGS (settings), FALSE);
|
||||
g_return_val_if_fail (filenames != NULL, FALSE);
|
||||
|
|
@ -678,12 +678,13 @@ nm_remote_settings_load_connections (NMRemoteSettings *settings,
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
dbus_g_proxy_call (priv->proxy, "LoadConnections", error,
|
||||
G_TYPE_STRV, filenames,
|
||||
G_TYPE_INVALID,
|
||||
G_TYPE_BOOLEAN, &ret,
|
||||
G_TYPE_STRV, &my_failures,
|
||||
G_TYPE_INVALID);
|
||||
if (!dbus_g_proxy_call (priv->proxy, "LoadConnections", error,
|
||||
G_TYPE_STRV, filenames,
|
||||
G_TYPE_INVALID,
|
||||
G_TYPE_BOOLEAN, &ret,
|
||||
G_TYPE_STRV, &my_failures,
|
||||
G_TYPE_INVALID))
|
||||
ret = FALSE;
|
||||
|
||||
if (failures) {
|
||||
if (my_failures && !*my_failures)
|
||||
|
|
|
|||
|
|
@ -435,14 +435,13 @@ nmt_secret_agent_get_secrets (NMSecretAgent *agent,
|
|||
{
|
||||
NmtSecretAgent *self = NMT_SECRET_AGENT (agent);
|
||||
NmtSecretAgentPrivate *priv = NMT_SECRET_AGENT_GET_PRIVATE (self);
|
||||
NmtSecretAgentRequest *request;
|
||||
NMSettingConnection *s_con;
|
||||
const char *connection_type;
|
||||
char *request_id;
|
||||
GError *error;
|
||||
|
||||
request_id = g_strdup_printf ("%s/%s", connection_path, setting_name);
|
||||
if ((request = g_hash_table_lookup (priv->requests, request_id)) != NULL) {
|
||||
if (g_hash_table_lookup (priv->requests, request_id) != NULL) {
|
||||
/* We already have a request pending for this (connection, setting) */
|
||||
error = g_error_new (NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_INTERNAL_ERROR,
|
||||
"Request for %s secrets already pending", request_id);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue