[gnome-software] plugin-appstream: Return FALSE if we set GError
- From: Colin Walters <walters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software] plugin-appstream: Return FALSE if we set GError
- Date: Tue, 5 Nov 2013 00:14:08 +0000 (UTC)
commit 9a7e11d1e488cfc42bddbb48473300c8355ee543
Author: Colin Walters <walters verbum org>
Date: Sun Nov 3 19:22:06 2013 -0500
plugin-appstream: Return FALSE if we set GError
Side note: an OSTree-like rigorous coding style where ret = FALSE
always at the start of a function would make this error setting errors
not happen.
https://bugzilla.gnome.org/show_bug.cgi?id=711368
src/plugins/gs-plugin-appstream.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/src/plugins/gs-plugin-appstream.c b/src/plugins/gs-plugin-appstream.c
index 52509ed..91ea54c 100644
--- a/src/plugins/gs-plugin-appstream.c
+++ b/src/plugins/gs-plugin-appstream.c
@@ -328,6 +328,7 @@ gs_plugin_startup (GsPlugin *plugin, GCancellable *cancellable, GError **error)
items = appstream_cache_get_items (plugin->priv->cache);
if (items->len == 0) {
g_warning ("No AppStream data, try 'make install-sample-data' in data/");
+ ret = FALSE;
g_set_error (error,
GS_PLUGIN_LOADER_ERROR,
GS_PLUGIN_LOADER_ERROR_FAILED,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]