From 4a33071e831b56f85bfd39918227e81b46360e35 Mon Sep 17 00:00:00 2001 From: Matthias Dieter Wallnöfer Date: Wed, 20 Oct 2010 19:55:28 +0200 Subject: 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 2dac333d0c..66a8180061 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; -- cgit