[evolution-kolab] camel-imapx-metadata.c: Change an assertion to a runtime warning.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-kolab] camel-imapx-metadata.c: Change an assertion to a runtime warning.
- Date: Thu, 12 Jul 2012 12:45:11 +0000 (UTC)
commit bded9eade6a261ec52e049b242b7fac20ed276f1
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jul 4 14:53:23 2012 -0400
camel-imapx-metadata.c: Change an assertion to a runtime warning.
So I can make progress on my work.
This is why the Evolution team prohibits assertions in production code.
src/libekolab/camel-imapx-metadata.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/src/libekolab/camel-imapx-metadata.c b/src/libekolab/camel-imapx-metadata.c
index 671f664..8434569 100644
--- a/src/libekolab/camel-imapx-metadata.c
+++ b/src/libekolab/camel-imapx-metadata.c
@@ -711,8 +711,9 @@ camel_imapx_metadata_spec_new (camel_imapx_metadata_proto_t proto,
{
CamelImapxMetadataSpec *spec = NULL;
- g_assert ((proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
- (proto < CAMEL_IMAPX_METADATA_LAST_PROTO));
+ g_return_val_if_fail (
+ (proto > CAMEL_IMAPX_METADATA_PROTO_INVAL) &&
+ (proto < CAMEL_IMAPX_METADATA_LAST_PROTO), NULL);
/* mailbox_name may be NULL when starting search at annotation level */
g_assert (entry_name != NULL);
/* attrib_name may be NULL, will then be replaced by "value" */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]