summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-06-02 19:53:43 +0200
committerThomas Haller <thaller@redhat.com>2017-06-02 19:53:44 +0200
commit6f1ea8b8eeea8229b013cfeb1c4f446b0eb85e73 (patch)
tree9a5ad5cd8377a5fc3d3214721a9bec2706b303ad
parent70879568704bd88438d34dd4f309ff6a641c56a3 (diff)
downloadNetworkManager-6f1ea8b8eeea8229b013cfeb1c4f446b0eb85e73.tar.gz
supplicant: work-around coverify false-positive for check_return: g_async_initable_init_finish()
NetworkManager-1.8.0/src/supplicant/nm-supplicant-interface.c:232: check_return: Calling "g_async_initable_init_finish" without checking return value (as is done elsewhere 7 out of 8 times).
-rw-r--r--src/supplicant/nm-supplicant-interface.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c
index 84ac640fc7..ddbc868634 100644
--- a/src/supplicant/nm-supplicant-interface.c
+++ b/src/supplicant/nm-supplicant-interface.c
@@ -235,15 +235,17 @@ bss_proxy_acquired_cb (GDBusProxy *proxy, GAsyncResult *result, gpointer user_da
GVariant *props = NULL;
const char *object_path;
BssData *bss_data;
+ gboolean success;
- g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error);
- if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ success = g_async_initable_init_finish (G_ASYNC_INITABLE (proxy), result, &error);
+ if ( !success
+ && g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
return;
self = NM_SUPPLICANT_INTERFACE (user_data);
priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
- if (error) {
+ if (!success) {
_LOGD ("failed to acquire BSS proxy: (%s)", error->message);
g_hash_table_remove (priv->bss_proxies,
g_dbus_proxy_get_object_path (proxy));