Skip to content

Commit

Permalink
transcode.c (rb_econv_open0): remove unused code
Browse files Browse the repository at this point in the history
Coverity Scan found this.
  • Loading branch information
mame committed Jul 23, 2019
1 parent 9aba971 commit a4e5690
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions transcode.c
Expand Up @@ -974,21 +974,10 @@ rb_econv_open0(const char *sname, const char *dname, int ecflags)
int num_trans;
rb_econv_t *ec;

int sidx, didx;

if (*sname) {
sidx = rb_enc_find_index(sname);
if (0 <= sidx) {
rb_enc_from_index(sidx);
}
}

if (*dname) {
didx = rb_enc_find_index(dname);
if (0 <= didx) {
rb_enc_from_index(didx);
}
}
/* Just check if sname and dname are defined */
/* (This check is needed?) */
if (*sname) rb_enc_find_index(sname);
if (*dname) rb_enc_find_index(dname);

if (*sname == '\0' && *dname == '\0') {
num_trans = 0;
Expand Down

0 comments on commit a4e5690

Please sign in to comment.