summaryrefslogtreecommitdiff
path: root/libnm-glib/nm-client.c
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-28 16:25:36 +0100
committerThomas Haller <thaller@redhat.com>2016-03-03 18:54:20 +0100
commit01b9b4104c365002fae5e45b564956062fe146d4 (patch)
treede72d05b95706d94a8750d9870768b61edf8b98a /libnm-glib/nm-client.c
parent7871d850f50975b46f7909bc6bd3cce434c7c60e (diff)
all: clean-up usage of GError
Functions that take a GError** MUST fill it in on error. There is no need to check whether error is NULL if the function it was passed to had a failing return value. Likewise, a proper GError must have a non-NULL message, so there's no need to double-check that either. Based-on-patch-by: Dan Winship <danw@gnome.org>
Diffstat (limited to 'libnm-glib/nm-client.c')
-rw-r--r--libnm-glib/nm-client.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm-glib/nm-client.c b/libnm-glib/nm-client.c
index fc105e53e7..3c0564684b 100644
--- a/libnm-glib/nm-client.c
+++ b/libnm-glib/nm-client.c
@@ -812,8 +812,8 @@ nm_client_deactivate_connection (NMClient *client, NMActiveConnection *active)
DBUS_TYPE_G_OBJECT_PATH, path,
G_TYPE_INVALID,
G_TYPE_INVALID)) {
- g_warning ("Could not deactivate connection '%s': %s",
- path, error ? error->message : "(unknown)");
+ g_warning ("Could not deactivate connection '%s': %s",
+ path, NM_G_ERROR_MSG (error));
g_clear_error (&error);
}
}