ext/stringio/stringio.c (strio_read): "binray" is always zero here
Remove unused conditional expression to suppress Coverity Scan warnings.
This commit is contained in:
parent
e6f188ea03
commit
deb5e58230
@ -1409,7 +1409,7 @@ strio_read(int argc, VALUE *argv, VALUE self)
|
|||||||
case 0:
|
case 0:
|
||||||
len = RSTRING_LEN(ptr->string);
|
len = RSTRING_LEN(ptr->string);
|
||||||
if (len <= ptr->pos) {
|
if (len <= ptr->pos) {
|
||||||
rb_encoding *enc = binary ? rb_ascii8bit_encoding() : get_enc(ptr);
|
rb_encoding *enc = get_enc(ptr);
|
||||||
if (NIL_P(str)) {
|
if (NIL_P(str)) {
|
||||||
str = rb_str_new(0, 0);
|
str = rb_str_new(0, 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user