summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@novell.com>2011-02-22 18:45:08 +0100
committerFrederic Crozat <fcrozat@novell.com>2011-03-08 14:14:35 +0100
commitf00802aa346a0274191d17ea6fca46a74b819a72 (patch)
tree65921096a700479d7626d609493ec24b434805da
parenta74b265ae407a30d4dd65c447bbe2bc3ea42095d (diff)
downloadyelp-f00802aa346a0274191d17ea6fca46a74b819a72.tar.gz
Fix return values in libyelp functions.
https://bugzilla.gnome.org/show_bug.cgi?id=642977
-rw-r--r--libyelp/yelp-bookmarks.c2
-rw-r--r--libyelp/yelp-docbook-document.c3
-rw-r--r--libyelp/yelp-document.c10
-rw-r--r--libyelp/yelp-document.h2
-rw-r--r--libyelp/yelp-man-document.c3
-rw-r--r--libyelp/yelp-storage.c4
-rw-r--r--libyelp/yelp-view.c1
7 files changed, 14 insertions, 11 deletions
diff --git a/libyelp/yelp-bookmarks.c b/libyelp/yelp-bookmarks.c
index 670650d9..a8aeab12 100644
--- a/libyelp/yelp-bookmarks.c
+++ b/libyelp/yelp-bookmarks.c
@@ -83,7 +83,7 @@ yelp_bookmarks_is_bookmarked (YelpBookmarks *bookmarks,
{
YelpBookmarksInterface *iface;
- g_return_if_fail (YELP_IS_BOOKMARKS (bookmarks));
+ g_return_val_if_fail (YELP_IS_BOOKMARKS (bookmarks), FALSE);
iface = YELP_BOOKMARKS_GET_INTERFACE (bookmarks);
diff --git a/libyelp/yelp-docbook-document.c b/libyelp/yelp-docbook-document.c
index 0d9b1825..2c6b9c13 100644
--- a/libyelp/yelp-docbook-document.c
+++ b/libyelp/yelp-docbook-document.c
@@ -259,7 +259,7 @@ docbook_request_page (YelpDocument *document,
callback,
user_data);
if (handled) {
- return;
+ return handled;
}
g_mutex_lock (priv->mutex);
@@ -289,6 +289,7 @@ docbook_request_page (YelpDocument *document,
}
g_mutex_unlock (priv->mutex);
+ return FALSE;
}
/******************************************************************************/
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index f0ba9f14..e51c1edd 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -750,7 +750,7 @@ yelp_document_get_page_icon (YelpDocument *document,
return ret;
}
-gchar *
+void
yelp_document_set_page_icon (YelpDocument *document,
const gchar *page_id,
const gchar *icon)
@@ -786,8 +786,8 @@ yelp_document_request_page (YelpDocument *document,
YelpDocumentCallback callback,
gpointer user_data)
{
- g_return_if_fail (YELP_IS_DOCUMENT (document));
- g_return_if_fail (YELP_DOCUMENT_GET_CLASS (document)->request_page != NULL);
+ g_return_val_if_fail (YELP_IS_DOCUMENT (document), FALSE);
+ g_return_val_if_fail (YELP_DOCUMENT_GET_CLASS (document)->request_page != NULL, FALSE);
debug_print (DB_FUNCTION, "entering\n");
@@ -1056,8 +1056,8 @@ gchar *
yelp_document_get_mime_type (YelpDocument *document,
const gchar *page_id)
{
- g_return_if_fail (YELP_IS_DOCUMENT (document));
- g_return_if_fail (YELP_DOCUMENT_GET_CLASS (document)->get_mime_type != NULL);
+ g_return_val_if_fail (YELP_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (YELP_DOCUMENT_GET_CLASS (document)->get_mime_type != NULL, NULL);
return YELP_DOCUMENT_GET_CLASS (document)->get_mime_type (document, page_id);
}
diff --git a/libyelp/yelp-document.h b/libyelp/yelp-document.h
index b79d47b5..16fc8aa0 100644
--- a/libyelp/yelp-document.h
+++ b/libyelp/yelp-document.h
@@ -148,7 +148,7 @@ void yelp_document_set_page_desc (YelpDocument *document,
gchar * yelp_document_get_page_icon (YelpDocument *document,
const gchar *page_id);
-gchar * yelp_document_set_page_icon (YelpDocument *document,
+void yelp_document_set_page_icon (YelpDocument *document,
const gchar *page_id,
const gchar *icon);
diff --git a/libyelp/yelp-man-document.c b/libyelp/yelp-man-document.c
index a49dfba0..8d8031bd 100644
--- a/libyelp/yelp-man-document.c
+++ b/libyelp/yelp-man-document.c
@@ -255,7 +255,7 @@ man_request_page (YelpDocument *document,
callback,
user_data);
if (handled) {
- return;
+ return handled;
}
g_mutex_lock (priv->mutex);
@@ -290,6 +290,7 @@ man_request_page (YelpDocument *document,
}
g_mutex_unlock (priv->mutex);
+ return FALSE;
}
diff --git a/libyelp/yelp-storage.c b/libyelp/yelp-storage.c
index e901af1d..97a1786b 100644
--- a/libyelp/yelp-storage.c
+++ b/libyelp/yelp-storage.c
@@ -76,7 +76,7 @@ yelp_storage_search (YelpStorage *storage,
{
YelpStorageInterface *iface;
- g_return_if_fail (YELP_IS_STORAGE (storage));
+ g_return_val_if_fail (YELP_IS_STORAGE (storage), NULL);
iface = YELP_STORAGE_GET_INTERFACE (storage);
@@ -92,7 +92,7 @@ yelp_storage_get_root_title (YelpStorage *storage,
{
YelpStorageInterface *iface;
- g_return_if_fail (YELP_IS_STORAGE (storage));
+ g_return_val_if_fail (YELP_IS_STORAGE (storage), NULL);
iface = YELP_STORAGE_GET_INTERFACE (storage);
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index af56af0f..92843a3e 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -181,6 +181,7 @@ struct _YelpActionEntry {
YelpViewActionValidFunc func;
gpointer data;
};
+static void
action_entry_free (YelpActionEntry *entry)
{
if (entry == NULL)