mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
numeric.c: Remove unreachable code
b cannot be <= 0 here. Found by Coverity Scan
This commit is contained in:
parent
cdd613b299
commit
1a4f33e84e
1 changed files with 1 additions and 4 deletions
|
@ -4079,10 +4079,7 @@ fix_pow(VALUE x, VALUE y)
|
|||
|
||||
if (b == 0) return INT2FIX(1);
|
||||
if (b == 1) return x;
|
||||
if (a == 0) {
|
||||
if (b > 0) return INT2FIX(0);
|
||||
return DBL2NUM(HUGE_VAL);
|
||||
}
|
||||
if (a == 0) return INT2FIX(0);
|
||||
return int_pow(a, b);
|
||||
}
|
||||
else if (RB_TYPE_P(y, T_BIGNUM)) {
|
||||
|
|
Loading…
Add table
Reference in a new issue