diff options
author | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-31 13:24:51 +0800 |
---|---|---|
committer | Srinivasa Ragavan <sragavan@src.gnome.org> | 2007-08-31 13:24:51 +0800 |
commit | e7d6ad6d83acd3aba0dc11d4955339b20ccc8cf3 (patch) | |
tree | a3bc6a92164f3659ae93f5ff168ef3eed924926c /mail/em-format.c | |
parent | 9ea10deea3b27d7bde1b82792cae76b99b5610f6 (diff) | |
download | gsoc2013-evolution-e7d6ad6d83acd3aba0dc11d4955339b20ccc8cf3.tar.gz gsoc2013-evolution-e7d6ad6d83acd3aba0dc11d4955339b20ccc8cf3.tar.zst gsoc2013-evolution-e7d6ad6d83acd3aba0dc11d4955339b20ccc8cf3.zip |
** Move away from g_assert to g_return* calls
svn path=/trunk/; revision=34143
Diffstat (limited to 'mail/em-format.c')
-rw-r--r-- | mail/em-format.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/mail/em-format.c b/mail/em-format.c index 7584f3301f..815b8cb0c3 100644 --- a/mail/em-format.c +++ b/mail/em-format.c @@ -333,7 +333,11 @@ em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *p d(printf("adding puri for part: %s\n", emf->part_id->str)); - g_assert(size >= sizeof(*puri)); + if (size < sizeof(*puri)) { + g_warning ("size (%d) less than size of puri\n", size); + size = sizeof (*puri); + } + puri = g_malloc0(size); puri->format = emf; @@ -374,9 +378,9 @@ em_format_add_puri(EMFormat *emf, size_t size, const char *cid, CamelMimePart *p } } - g_assert(puri->cid != NULL); - g_assert(emf->pending_uri_level != NULL); - g_assert(emf->pending_uri_table != NULL); + g_return_val_if_fail (puri->cid != NULL, NULL); + g_return_val_if_fail (emf->pending_uri_level != NULL, NULL); + g_return_val_if_fail (emf->pending_uri_table != NULL, NULL); e_dlist_addtail(&emf->pending_uri_level->uri_list, (EDListNode *)puri); |