From b663fac4aba204cd2bfe9e2d23c3cc40d9855978 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 6 Jul 2001 21:59:14 +0000 Subject: Don't allow in to be NULL, so instead of doing if (in == NULL) return;, 2001-07-06 Jeffrey Stedfast * 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 --- camel/ChangeLog | 5 +++++ camel/camel-mime-utils.c | 4 +--- 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 + * 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) -- cgit