mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* random.c (rand_init): This checks the value is in 32bit or not,
so use int32_t, not int. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@29409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b259e449d1
commit
25eebc3ad5
2 changed files with 6 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Mon Oct 4 10:22:21 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* random.c (rand_init): This checks the value is in 32bit or not,
|
||||
so use int32_t, not int.
|
||||
|
||||
Mon Oct 4 09:47:39 2010 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* random.c (rand_init): remove useless assignment.
|
||||
|
|
2
random.c
2
random.c
|
@ -403,7 +403,7 @@ rand_init(struct MT *mt, VALUE vseed)
|
|||
fixnum_seed = -fixnum_seed;
|
||||
buf[0] = (unsigned int)(fixnum_seed & 0xffffffff);
|
||||
#if SIZEOF_LONG > SIZEOF_INT32
|
||||
if ((long)(int)fixnum_seed != fixnum_seed) {
|
||||
if ((long)(int32_t)fixnum_seed != fixnum_seed) {
|
||||
if ((buf[1] = (unsigned int)(fixnum_seed >> 32)) != 0) ++len;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue