Don't allow in to be NULL, so instead of doing if (in == NULL) return;,
authorJeffrey Stedfast <fejj@ximian.com>
Fri, 6 Jul 2001 21:59:14 +0000 (21:59 +0000)
committerJeffrey Stedfast <fejj@src.gnome.org>
Fri, 6 Jul 2001 21:59:14 +0000 (21:59 +0000)
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.

camel/ChangeLog
camel/camel-mime-utils.c

index 08413f1..9c46f55 100644 (file)
@@ -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.
 
index 70b0a3f..10730a4 100644 (file)
@@ -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)