summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-20 19:55:28 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-10-21 08:28:50 +0200
commit4a33071e831b56f85bfd39918227e81b46360e35 (patch)
treefb512e79ddd4d85e7f9162db277ccccaf6ab62f1 /lib
parent94dc63056a83168c605f14a8ce47b9b75a96fa2f (diff)
downloadsamba-4a33071e831b56f85bfd39918227e81b46360e35.tar.gz
samba-4a33071e831b56f85bfd39918227e81b46360e35.tar.bz2
samba-4a33071e831b56f85bfd39918227e81b46360e35.zip
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".
Diffstat (limited to 'lib')
-rw-r--r--lib/util/charset/iconv.c5
1 files changed, 1 insertions, 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;