From 4a33071e831b56f85bfd39918227e81b46360e35 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Matthias=20Dieter=20Walln=C3=B6fer?= Date: Wed, 20 Oct 2010 19:55:28 +0200 Subject: [PATCH 1/1] s4:lib/util/charset/iconv.c - remove a distinction which can never happen "ret->cd_direct" is never set before. It is set in the "if" upperwards but then the function is terminated with "return". --- lib/util/charset/iconv.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/util/charset/iconv.c b/lib/util/charset/iconv.c index 2dac333d0c4..66a81800616 100644 --- a/lib/util/charset/iconv.c +++ b/lib/util/charset/iconv.c @@ -159,7 +159,7 @@ static bool is_utf16(const char *name) } int smb_iconv_t_destructor(smb_iconv_t hwd) -{ +{ #ifdef HAVE_NATIVE_ICONV if (hwd->cd_pull != NULL && hwd->cd_pull != (iconv_t)-1) iconv_close(hwd->cd_pull); @@ -260,9 +260,6 @@ _PUBLIC_ smb_iconv_t smb_iconv_open_ex(TALLOC_CTX *mem_ctx, const char *tocode, } if (is_utf16(tocode)) { ret->direct = sys_iconv; - /* could be set just above - so we need to close iconv */ - if (ret->cd_direct != NULL && ret->cd_direct != (iconv_t)-1) - iconv_close(ret->cd_direct); ret->cd_direct = ret->cd_pull; ret->cd_pull = NULL; return ret; -- 2.34.1