From b0a33247c35bf394200462e53ceef06da8f53734 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 25 Jun 2015 17:52:25 +0200 Subject: [PATCH] libnm-glib: avoid coverity warning 5. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:493: var_compare_op: Comparing "error" to null implies that "error" might be null. 8. NetworkManager-1.0.3/libnm-glib/nm-remote-settings.c:508: var_deref_op: Dereferencing null pointer "error". # 506| g_hash_table_remove (priv->pending, path); # 507| # 508|-> if (print_once && error->code == DBUS_GERROR_LIMITS_EXCEEDED) { # 509| g_printerr ("Warning: libnm-glib:%s(): a D-Bus limit exceeded: %s. The application might not work properly.\n" # 510| "Consider increasing max_replies_per_connection limit in /etc/dbus-1/system.d/org.freedesktop.NetworkManager.conf " (cherry picked from commit c157e3233d638dcd355ba1006031de6b98f3b679) --- libnm-glib/nm-remote-settings.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libnm-glib/nm-remote-settings.c b/libnm-glib/nm-remote-settings.c index ba0aa47be6..80a274f5e3 100644 --- a/libnm-glib/nm-remote-settings.c +++ b/libnm-glib/nm-remote-settings.c @@ -493,7 +493,7 @@ connection_inited (GObject *source, GAsyncResult *result, gpointer user_data) local = g_error_new (NM_REMOTE_SETTINGS_ERROR, NM_REMOTE_SETTINGS_ERROR_CONNECTION_UNAVAILABLE, "Connection not visible or not available: %s", - error ? error->message : "(unknown)"); + error->message); add_connection_info_complete (self, addinfo, local); g_error_free (local); }