libfwup: Fix up some NULL/FALSE confusion

This commit is contained in:
Richard Hughes 2016-03-18 12:21:47 +00:00
parent bd046c8a19
commit 9d8126ec63
2 changed files with 7 additions and 7 deletions

View File

@ -451,11 +451,11 @@ fwupd_client_get_results (FwupdClient *client, const gchar *device_id,
g_autoptr(FwupdClientHelper) helper = NULL; g_autoptr(FwupdClientHelper) helper = NULL;
g_autoptr(GVariant) val = NULL; g_autoptr(GVariant) val = NULL;
g_return_val_if_fail (FWUPD_IS_CLIENT (client), FALSE); g_return_val_if_fail (FWUPD_IS_CLIENT (client), NULL);
/* connect */ /* connect */
if (!fwupd_client_startup (client, cancellable, error)) if (!fwupd_client_startup (client, cancellable, error))
return FALSE; return NULL;
/* call into daemon */ /* call into daemon */
helper = fwupd_client_helper_new (); helper = fwupd_client_helper_new ();
@ -471,7 +471,7 @@ fwupd_client_get_results (FwupdClient *client, const gchar *device_id,
if (!helper->ret) { if (!helper->ret) {
g_propagate_error (error, helper->error); g_propagate_error (error, helper->error);
helper->error = NULL; helper->error = NULL;
return FALSE; return NULL;
} }
return fwupd_result_new_from_data (helper->val); return fwupd_result_new_from_data (helper->val);
} }
@ -628,12 +628,12 @@ fwupd_client_get_details (FwupdClient *client, const gchar *filename,
g_autoptr(GDBusMessage) request = NULL; g_autoptr(GDBusMessage) request = NULL;
g_autoptr(GUnixFDList) fd_list = NULL; g_autoptr(GUnixFDList) fd_list = NULL;
g_return_val_if_fail (FWUPD_IS_CLIENT (client), FALSE); g_return_val_if_fail (FWUPD_IS_CLIENT (client), NULL);
g_return_val_if_fail (filename != NULL, FALSE); g_return_val_if_fail (filename != NULL, NULL);
/* connect */ /* connect */
if (!fwupd_client_startup (client, cancellable, error)) if (!fwupd_client_startup (client, cancellable, error))
return FALSE; return NULL;
/* open file */ /* open file */
fd = open (filename, O_RDONLY); fd = open (filename, O_RDONLY);

View File

@ -20,7 +20,7 @@
*/ */
/** /**
* SECTION:cd-version * SECTION:fwupd-version
* @short_description: Obtains the version for the installed fwupd * @short_description: Obtains the version for the installed fwupd
* *
* These compile time macros allow the user to enable parts of client code * These compile time macros allow the user to enable parts of client code