diff options
author | Thomas Haller <thaller@redhat.com> | 2016-02-28 16:25:36 +0100 |
---|---|---|
committer | Thomas Haller <thaller@redhat.com> | 2016-03-03 18:54:20 +0100 |
commit | 01b9b4104c365002fae5e45b564956062fe146d4 (patch) | |
tree | de72d05b95706d94a8750d9870768b61edf8b98a /libnm | |
parent | 7871d850f50975b46f7909bc6bd3cce434c7c60e (diff) | |
download | NetworkManager-01b9b4104c365002fae5e45b564956062fe146d4.tar.gz |
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')
-rw-r--r-- | libnm/nm-remote-connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libnm/nm-remote-connection.c b/libnm/nm-remote-connection.c index d2b55bd84f..7a739e2cb1 100644 --- a/libnm/nm-remote-connection.c +++ b/libnm/nm-remote-connection.c @@ -567,8 +567,8 @@ replace_settings (NMRemoteConnection *self, GVariant *new_settings) g_warning ("%s: error updating connection %s settings: (%d) %s", __func__, nm_connection_get_path (NM_CONNECTION (self)), - error ? error->code : -1, - (error && error->message) ? error->message : "(unknown)"); + error->code, + error->message); g_clear_error (&error); } } |