diff options
Diffstat (limited to 'lib/libc/iconv/bsd_iconv.c')
-rw-r--r-- | lib/libc/iconv/bsd_iconv.c | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/lib/libc/iconv/bsd_iconv.c b/lib/libc/iconv/bsd_iconv.c index 0fcff0e2d1b8..d3da6fd1a271 100644 --- a/lib/libc/iconv/bsd_iconv.c +++ b/lib/libc/iconv/bsd_iconv.c @@ -1,4 +1,3 @@ -/* $FreeBSD$ */ /* $NetBSD: iconv.c,v 1.11 2009/03/03 16:22:33 explorer Exp $ */ /*- @@ -30,7 +29,6 @@ * SUCH DAMAGE. */ -#include <sys/cdefs.h> #include <sys/queue.h> #include <sys/types.h> @@ -56,8 +54,6 @@ static iconv_t __bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle) { - const char *out_slashes; - char *out_noslashes; int ret; /* @@ -66,27 +62,13 @@ __bsd___iconv_open(const char *out, const char *in, struct _citrus_iconv *handle * This is for compatibility with software that uses these * blindly. */ - out_slashes = strstr(out, "//"); - if (out_slashes != NULL) { - out_noslashes = strndup(out, out_slashes - out); - if (out_noslashes == NULL) { - errno = ENOMEM; - return ((iconv_t)-1); - } - ret = _citrus_iconv_open(&handle, in, out_noslashes); - free(out_noslashes); - } else { - ret = _citrus_iconv_open(&handle, in, out); - } - + ret = _citrus_iconv_open(&handle, in, out); if (ret) { errno = ret == ENOENT ? EINVAL : ret; return ((iconv_t)-1); } handle->cv_shared->ci_discard_ilseq = strcasestr(out, "//IGNORE"); - handle->cv_shared->ci_ilseq_invalid = false; - handle->cv_shared->ci_hooks = NULL; return ((iconv_t)(void *)handle); } |