aboutsummaryrefslogtreecommitdiffstats
path: root/transcode.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 03:38:59 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-09-06 03:38:59 +0000
commit073bced3671d70f8764cdd09015648d859a0ad20 (patch)
tree65322a3c461eba335b24f7030f2ba81bdc2f69c3 /transcode.c
parent393f57670fa5dd8ee09ed3fd2fefbb709ec3e874 (diff)
downloadruby-073bced3671d70f8764cdd09015648d859a0ad20.tar.gz
* transcode.c (rb_econv_open): test condition simplified.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19175 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'transcode.c')
-rw-r--r--transcode.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/transcode.c b/transcode.c
index 5c9e7d8264..d779741323 100644
--- a/transcode.c
+++ b/transcode.c
@@ -928,8 +928,7 @@ rb_econv_open(const char *sname, const char *dname, int ecflags)
return NULL;
}
- if ((!*sname || (senc && rb_enc_asciicompat(senc))) &&
- (ecflags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER))) {
+ if (ecflags & (ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER)) {
const char *name = (ecflags & ECONV_CRLF_NEWLINE_ENCODER) ? "crlf_newline" : "cr_newline";
transcoder_entry_t *e = get_transcoder_entry("", name);
if (ecflags & ECONV_CRLF_NEWLINE_ENCODER)
@@ -949,8 +948,7 @@ rb_econv_open(const char *sname, const char *dname, int ecflags)
ecflags &= ~(ECONV_CRLF_NEWLINE_ENCODER|ECONV_CR_NEWLINE_ENCODER);
}
- if ((!*dname || (denc && rb_enc_asciicompat(denc))) &&
- (ecflags & ECONV_UNIVERSAL_NEWLINE_DECODER)) {
+ if (ecflags & ECONV_UNIVERSAL_NEWLINE_DECODER) {
transcoder_entry_t *e = get_transcoder_entry("universal_newline", "");
if (!e) {
xfree(entries);