From 977306ba0fe6686a781a2fbe33ffe268ec1ad386 Mon Sep 17 00:00:00 2001 From: Christian Hilberg Date: Tue, 26 Jun 2012 16:32:53 +0200 Subject: [PATCH] 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 file 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 */ -- 2.7.4