aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-07-07 05:59:14 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-07-07 05:59:14 +0800
commitb663fac4aba204cd2bfe9e2d23c3cc40d9855978 (patch)
tree44879e8a3c910054daa2391d99ca1aebae2c11c8
parent3dc641a7bf4d435e32ee89ad7748c639574a32e0 (diff)
downloadgsoc2013-evolution-b663fac4aba204cd2bfe9e2d23c3cc40d9855978.tar.gz
gsoc2013-evolution-b663fac4aba204cd2bfe9e2d23c3cc40d9855978.tar.zst
gsoc2013-evolution-b663fac4aba204cd2bfe9e2d23c3cc40d9855978.zip
Don't allow in to be NULL, so instead of doing if (in == NULL) return;,
2001-07-06 Jeffrey Stedfast <fejj@ximian.com> * camel-mime-utils.c (header_encode_param): Don't allow in to be NULL, so instead of doing if (in == NULL) return;, make it a g_return_val_if_fail and later we can make it an assert or something. svn path=/trunk/; revision=10868
-rw-r--r--camel/ChangeLog5
-rw-r--r--camel/camel-mime-utils.c4
2 files changed, 6 insertions, 3 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 08413f1dc8..9c46f55356 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,10 @@
2001-07-06 Jeffrey Stedfast <fejj@ximian.com>
+ * camel-mime-utils.c (header_encode_param): Don't allow in to be
+ NULL, so instead of doing if (in == NULL) return;, make it a
+ g_return_val_if_fail and later we can make it an assert or
+ something.
+
* providers/local/camel-maildir-store.c (get_inbox): Fixes bug
#1138.
diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c
index 70b0a3f60a..10730a4301 100644
--- a/camel/camel-mime-utils.c
+++ b/camel/camel-mime-utils.c
@@ -2730,11 +2730,9 @@ header_encode_param (const unsigned char *in, gboolean *encoded)
*encoded = FALSE;
+ g_return_val_if_fail (in != NULL, NULL);
g_return_val_if_fail (g_utf8_validate (in, -1, NULL), NULL);
- if (in == NULL)
- return NULL;
-
/* do a quick us-ascii check (the common case?) */
while (*inptr) {
if (*inptr > 127)