diff options
author | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-04 01:23:58 +0000 |
---|---|---|
committer | naruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-10-04 01:23:58 +0000 |
commit | b259e449d14e47e225960ec0fce12a5b2c1bec6d (patch) | |
tree | bfd3f3e3fcfcc3bb1769177ece8d2f229006cb61 /random.c | |
parent | 3a633b812e3676d4a1c8f20426d0354be530e056 (diff) | |
download | ruby-b259e449d14e47e225960ec0fce12a5b2c1bec6d.tar.gz |
* random.c (rand_init): remove useless assignment.
* re.c (update_char_offset): remove unused variable.
* re.c (read_escaped_byte): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29408 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -415,7 +415,7 @@ rand_init(struct MT *mt, VALUE vseed) } else { if (blen > MT_MAX_STATE * SIZEOF_INT32 / SIZEOF_BDIGITS) - blen = (len = MT_MAX_STATE) * SIZEOF_INT32 / SIZEOF_BDIGITS; + blen = MT_MAX_STATE * SIZEOF_INT32 / SIZEOF_BDIGITS; len = roomof((int)blen * SIZEOF_BDIGITS, SIZEOF_INT32); } /* allocate ints for init_by_array */ @@ -1066,7 +1066,7 @@ random_rand(int argc, VALUE *argv, VALUE obj) v = Qnil; } else if (TYPE(vmax) != T_FLOAT && (v = rb_check_to_integer(vmax, "to_int"), !NIL_P(v))) { - v = rand_int(&rnd->mt, vmax = v, 1); + v = rand_int(&rnd->mt, v, 1); } else if (v = rb_check_to_float(vmax), !NIL_P(v)) { double max = float_value(v); |