[devhelp] language: fix return values in sanity checks
- From: Aleksander Morgado <aleksm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [devhelp] language: fix return values in sanity checks
- Date: Mon, 20 Dec 2010 15:08:09 +0000 (UTC)
commit e33b9aacc0290bfb9aaba3f8624d2f8197684075
Author: Aleksander Morgado <aleksander lanedo com>
Date: Mon Dec 20 16:07:00 2010 +0100
language: fix return values in sanity checks
src/dh-language.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/src/dh-language.c b/src/dh-language.c
index c1278af..da26560 100644
--- a/src/dh-language.c
+++ b/src/dh-language.c
@@ -54,8 +54,8 @@ gint
dh_language_compare (const DhLanguage *language_a,
const DhLanguage *language_b)
{
- g_return_val_if_fail (language_a != NULL, NULL);
- g_return_val_if_fail (language_b != NULL, NULL);
+ g_return_val_if_fail (language_a != NULL, -1);
+ g_return_val_if_fail (language_b != NULL, -1);
return strcmp (language_a->name, language_b->name);
}
@@ -64,8 +64,8 @@ gint
dh_language_compare_by_name (const DhLanguage *language_a,
const gchar *language_name_b)
{
- g_return_val_if_fail (language_a != NULL, NULL);
- g_return_val_if_fail (language_name_b != NULL, NULL);
+ g_return_val_if_fail (language_a != NULL, -1);
+ g_return_val_if_fail (language_name_b != NULL, -1);
return strcmp (language_a->name, language_name_b);
}
@@ -82,7 +82,7 @@ dh_language_get_name (DhLanguage *language)
gint
dh_language_get_n_books_enabled (DhLanguage *language)
{
- g_return_val_if_fail (language != NULL, NULL);
+ g_return_val_if_fail (language != NULL, -1);
return language->n_books_enabled;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]