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
This commit is contained in:
Jeffrey Stedfast
2001-07-06 21:59:14 +00:00
committed by Jeffrey Stedfast
parent 3dc641a7bf
commit b663fac4ab
2 changed files with 6 additions and 3 deletions

View 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.

View 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)