diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-13 12:41:29 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-05-13 12:41:29 +0000 |
commit | a22df39467709c4f270f45fbdfb0b548156bd633 (patch) | |
tree | ed9a2f5e1ccedafb2a4cb40dbd212d2c5c8755ad /missing | |
parent | cb4133c8abc7f7d20d3046bd62f862aef216c5a9 (diff) |
* 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
Diffstat (limited to 'missing')
-rw-r--r-- | missing/ffs.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/missing/ffs.c b/missing/ffs.c index 1a1189968a..bad99cf116 100644 --- a/missing/ffs.c +++ b/missing/ffs.c @@ -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; |