[evolution-data-server] IMAPX: (utils) use g_return_if_fail() family of functions instead of g_assert()
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] IMAPX: (utils) use g_return_if_fail() family of functions instead of g_assert()
- Date: Tue, 26 Jun 2012 15:21:36 +0000 (UTC)
commit 977306ba0fe6686a781a2fbe33ffe268ec1ad386
Author: Christian Hilberg <chilberg src gnome org>
Date: Tue Jun 26 16:32:53 2012 +0200
IMAPX: (utils) use g_return_if_fail() family of functions instead of g_assert()
* changed the function param sanity checking from assertions
to the g_return*_if_fail() family of functions, so we can
stumble along instead of barfing in front of the user
camel/camel-imapx-utils.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/camel/camel-imapx-utils.c b/camel/camel-imapx-utils.c
index 4a7f2cc..cc3feb8 100644
--- a/camel/camel-imapx-utils.c
+++ b/camel/camel-imapx-utils.c
@@ -479,7 +479,7 @@ imapx_register_capability (const gchar *capability)
GList *keys = NULL;
GList *tmp_keys = NULL;
- g_assert (capability != NULL);
+ g_return_val_if_fail (capability != NULL, 0);
g_mutex_lock (&capa_htable_lock);
@@ -504,7 +504,7 @@ imapx_register_capability (const gchar *capability)
/* shift-left biggest-so-far, sanity-check */
check_id = (capa_id << 1);
- g_assert (check_id <= (guint64) G_MAXUINT32);
+ g_return_val_if_fail (check_id <= (guint64) G_MAXUINT32, 0);
capa_id = (guint32) check_id;
/* insert */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]