From 8d137d97858a618c8c5451bb7b11fb95990540c8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 27 Apr 2006 16:05:05 +0000 Subject: r15295: Fix some dependencies Move unistr-specific code to lib/charset/. Remove _m from some places where it's not needed. (This used to be commit 03224e112424968fc3f547c6159c7ccae2d1aa5b) --- source4/lib/charset/charcnv.c | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'source4/lib/charset/charcnv.c') diff --git a/source4/lib/charset/charcnv.c b/source4/lib/charset/charcnv.c index d1d4561fa5..ca06b3b7d6 100644 --- a/source4/lib/charset/charcnv.c +++ b/source4/lib/charset/charcnv.c @@ -43,17 +43,16 @@ **/ static const char *charset_name(charset_t ch) { - const char *ret = NULL; - - if (ch == CH_UTF16) ret = "UTF-16LE"; - else if (ch == CH_UNIX) ret = lp_unix_charset(); - else if (ch == CH_DOS) ret = lp_dos_charset(); - else if (ch == CH_DISPLAY) ret = lp_display_charset(); - else if (ch == CH_UTF8) ret = "UTF8"; - else if (ch == CH_UTF16BE) ret = "UTF-16BE"; - - if (!ret || !*ret) ret = "ASCII"; - return ret; + switch (ch) { + case CH_UTF16: return "UTF-16LE"; + case CH_UNIX: return lp_unix_charset(); + case CH_DOS: return lp_dos_charset(); + case CH_DISPLAY: return lp_display_charset(); + case CH_UTF8: return "UTF8"; + case CH_UTF16BE: return "UTF-16BE"; + default: + return "ASCII"; + } } static smb_iconv_t conv_handles[NUM_CHARSETS][NUM_CHARSETS]; -- cgit