diff options
Diffstat (limited to 'camel')
-rw-r--r-- | camel/ChangeLog | 8 | ||||
-rw-r--r-- | camel/camel-mime-utils.c | 4 | ||||
-rw-r--r-- | camel/camel-search-private.c | 7 |
3 files changed, 15 insertions, 4 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index 24f3b2805b..9f85cf2203 100644 --- a/camel/ChangeLog +++ b/camel/ChangeLog @@ -1,3 +1,11 @@ +2001-03-02 Not Zed <NotZed@Ximian.com> + + * camel-mime-utils.c (rfc2047_encode_word, rfc2047_decode_word): + Reconstify variables to match iconv. + + * camel-search-private.c (camel_ustrstrcase): Change some + assertions back into valid returns. + 2001-03-01 Dan Winship <danw@ximian.com> * Makefile.am (libcamel_la_LIBADD, INCLUDES): camel depends on diff --git a/camel/camel-mime-utils.c b/camel/camel-mime-utils.c index b663ffab90..ad2a200708 100644 --- a/camel/camel-mime-utils.c +++ b/camel/camel-mime-utils.c @@ -902,7 +902,7 @@ rfc2047_decode_word(const char *in, int len) { const char *inptr = in+2; const char *inend = in+len-2; - char *inbuf; + const char *inbuf; char *encname; int tmplen; int ret; @@ -1143,7 +1143,7 @@ rfc2047_encode_word(GString *outstring, const char *in, int len, const char *typ iconv_t ic = (iconv_t *)-1; char *buffer, *out, *ascii; size_t inlen, outlen, enclen, bufflen; - char *inptr, *p; + const char *inptr, *p; int first = 1; d(printf("Converting [%d] '%.*s' to %s\n", len, len, in, type)); diff --git a/camel/camel-search-private.c b/camel/camel-search-private.c index a288e91ca6..a6a87c0728 100644 --- a/camel/camel-search-private.c +++ b/camel/camel-search-private.c @@ -247,8 +247,11 @@ camel_ustrstrcase (const char *haystack, const char *needle) g_return_val_if_fail (haystack != NULL, NULL); g_return_val_if_fail (needle != NULL, NULL); - g_return_val_if_fail (strlen (needle) != 0, haystack); - g_return_val_if_fail (strlen (haystack) != 0, NULL); + + if (strlen(needle) == 0) + return haystack; + if (strlen(haystack) == 0) + return NULL; puni = nuni = alloca (sizeof (unicode_char_t) * strlen (needle)); |