Commit e9fe63cd authored by Dan Winship's avatar Dan Winship
Browse files

trivial: annotate/adjust some code to appease Coverity

parent a7249cc6
......@@ -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,
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);
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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment