Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2012 02:23:20 +0000 (UTC)
From:      Kevin Lo <kevlo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r235710 - head/sys/libkern
Message-ID:  <201205210223.q4L2NKYO031488@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevlo
Date: Mon May 21 02:23:20 2012
New Revision: 235710
URL: http://svn.freebsd.org/changeset/base/235710

Log:
  Remove dead code

Modified:
  head/sys/libkern/iconv_ucs.c

Modified: head/sys/libkern/iconv_ucs.c
==============================================================================
--- head/sys/libkern/iconv_ucs.c	Mon May 21 00:15:58 2012	(r235709)
+++ head/sys/libkern/iconv_ucs.c	Mon May 21 02:23:20 2012	(r235710)
@@ -102,12 +102,12 @@ iconv_ucs_open(struct iconv_converter_cl
 	if (cspf)
 		dp->convtype |= KICONV_UCS_COMBINE;
 	for (i = 0; unicode_family[i].name; i++) {
-		if (strcmp(from, unicode_family[i].name) == 0)
+		if (strcasecmp(from, unicode_family[i].name) == 0)
 			dp->convtype |= unicode_family[i].from_flag;
-		if (strcmp(to, unicode_family[i].name) == 0)
+		if (strcasecmp(to, unicode_family[i].name) == 0)
 			dp->convtype |= unicode_family[i].to_flag;
 	}
-	if (strcmp(ENCODING_UNICODE, ENCODING_UTF16) == 0)
+	if (strcasecmp(ENCODING_UNICODE, ENCODING_UTF16) == 0)
 		dp->convtype |= KICONV_UCS_UCS4;
 	else
 		dp->convtype &= ~KICONV_UCS_UCS4;
@@ -457,8 +457,6 @@ utf8_to_ucs4(const char *src, size_t *ut
 		/* out of utf-16 range or having illegal bits */
 		return (0);
 	}
-	if (w == 0)
-		return (0);
 
 	if (srclen < w)
 		return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201205210223.q4L2NKYO031488>