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-glib/nm-secret-agent.c | |
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-glib/nm-secret-agent.c')
-rw-r--r-- | libnm-glib/nm-secret-agent.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/libnm-glib/nm-secret-agent.c b/libnm-glib/nm-secret-agent.c index a0966f9f6c..073729da5d 100644 --- a/libnm-glib/nm-secret-agent.c +++ b/libnm-glib/nm-secret-agent.c @@ -331,8 +331,7 @@ verify_request (NMSecretAgent *self, NM_SECRET_AGENT_ERROR, NM_SECRET_AGENT_ERROR_INVALID_CONNECTION, "Invalid connection: (%d) %s", - local ? local->code : -1, - (local && local->message) ? local->message : "(unknown)"); + local->code, local->message); g_clear_error (&local); } |