From 49e81a0bda0d8914a4785d73e366b680186e9406 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Thu, 19 Jul 2001 23:11:13 +0000 Subject: Modified to treat the return value from camel_charset_locale_name() as a 2001-07-19 Jeffrey Stedfast * camel-pgp-context.c (pgp_verify): Modified to treat the return value from camel_charset_locale_name() as a const char*. * camel-sasl-digest-md5.c (digest_response): Modified to treat the return value from camel_charset_locale_name() as a const char*. * camel-charset-map.c (camel_charset_locale_name): Modify to return const char* by returning the static locale_charset which is created inside of camel_charset_map_init(). (camel_charset_map_init): Find the locale charset here and set the static variable. svn path=/trunk/; revision=11245 --- camel/camel-pgp-context.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'camel/camel-pgp-context.c') diff --git a/camel/camel-pgp-context.c b/camel/camel-pgp-context.c index cde9f76d25..3f377909f7 100644 --- a/camel/camel-pgp-context.c +++ b/camel/camel-pgp-context.c @@ -981,7 +981,8 @@ pgp_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream, } if (diagnostics) { - char *locale, *desc, *outbuf; + const char *locale; + char *desc, *outbuf; size_t inlen, outlen; iconv_t cd; @@ -992,10 +993,9 @@ pgp_verify (CamelCipherContext *ctx, CamelCipherHash hash, CamelStream *istream, locale = camel_charset_locale_name (); if (!locale) - locale = g_strdup ("iso-8859-1"); + locale = "iso-8859-1"; cd = iconv_open ("UTF-8", locale); - g_free (locale); if (cd != (iconv_t) -1) { const char *inbuf; -- cgit v1.2.3