зеркало из https://github.com/github/ruby.git
transcode.c (rb_econv_open0): remove unused code
Coverity Scan found this.
This commit is contained in:
Родитель
9aba971e42
Коммит
a4e5690760
19
transcode.c
19
transcode.c
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче