1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* missing/ffs.c (ffs): fixed for non-zero values.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27788 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2010-05-13 12:41:29 +00:00
parent cb4133c8ab
commit a22df39467
2 changed files with 7 additions and 1 deletions

View file

@ -1,3 +1,7 @@
Thu May 13 21:40:39 2010 Tanaka Akira <akr@fsij.org>
* missing/ffs.c (ffs): fixed for non-zero values.
Thu May 13 18:45:25 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/io/console/console.c (get_write_fd): return primary fd if no

View file

@ -6,11 +6,13 @@
int ffs(int arg)
{
unsigned int x = (unsigned int)arg;
int r = 0;
int r;
if (x == 0)
return 0;
r = 1;
#if 32 < SIZEOF_INT * CHAR_BIT
if ((x & 0xffffffff) == 0) {
x >>= 32;