X-Git-Url: https://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Funicodeio.c;h=9f903664392d814ec5f21bcca645499a4d071f4e;hb=3b3e7e80daac86fbdded8b0047a4a52ec2324ab8;hp=2771132d8ec2b5ec680e9664ed9185f8995911a0;hpb=9988b8061774009801b30317af2309eb24f94e3f;p=gnulib.git diff --git a/lib/unicodeio.c b/lib/unicodeio.c index 2771132d8..9f9036643 100644 --- a/lib/unicodeio.c +++ b/lib/unicodeio.c @@ -1,6 +1,6 @@ /* Unicode character output to streams with locale dependent encoding. - Copyright (C) 2000 Free Software Foundation, Inc. + Copyright (C) 2000, 2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published @@ -124,13 +124,11 @@ print_unicode_char (FILE *stream, unsigned int code) extern const char *locale_charset PARAMS ((void)); const char *charset = locale_charset (); - is_utf8 = (charset != NULL && !strcmp (charset, UTF8_NAME)); + is_utf8 = !strcmp (charset, UTF8_NAME); #if HAVE_ICONV if (!is_utf8) { - utf8_to_local = (charset != NULL - ? iconv_open (charset, UTF8_NAME) - : (iconv_t)(-1)); + utf8_to_local = iconv_open (charset, UTF8_NAME); if (utf8_to_local == (iconv_t)(-1)) { /* For an unknown encoding, assume ASCII. */