diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-17 01:42:28 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-09-17 01:42:28 +0000 |
commit | 8a3fed6ec127faafb3f9c2d6813124c57e9ff83b (patch) | |
tree | 677c9730e58543624ca7df5bf65be143c3d07788 /numeric.c | |
parent | b88830c7dabbb5e4c3cce5736112cd6350db6ebd (diff) | |
download | ruby-8a3fed6ec127faafb3f9c2d6813124c57e9ff83b.tar.gz ruby-8a3fed6ec127faafb3f9c2d6813124c57e9ff83b.tar.xz ruby-8a3fed6ec127faafb3f9c2d6813124c57e9ff83b.zip |
* numeric.c (fix_mul): fixed typo. fixed: [ruby-core:08885]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@10954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1475,7 +1475,7 @@ rb_num2long(VALUE val) char *s; sprintf(buf, "%-.10g", RFLOAT(val)->value); - if (s = strchr(buf, ' ')) *s = '\0'; + if ((s = strchr(buf, ' ')) != 0) *s = '\0'; rb_raise(rb_eRangeError, "float %s out of range of integer", buf); } @@ -1623,7 +1623,7 @@ rb_num2ll(VALUE val) char *s; sprintf(buf, "%-.10g", RFLOAT(val)->value); - if (s = strchr(buf, ' ')) *s = '\0'; + if ((s = strchr(buf, ' ')) != 0) *s = '\0'; rb_raise(rb_eRangeError, "float %s out of range of long long", buf); } @@ -1991,7 +1991,7 @@ fix_mul(VALUE x, VALUE y) #else # define SQRT_LONG_MAX (1<<((SIZEOF_VALUE*CHAR_BIT-1)/2)) /*tests if N*N would overflow*/ -# define FIT_SQRT_LONG(n) (((n)<SQRT_LONG_MAX)&&((N)>=-SQRT_LONG_MAX)) +# define FIT_SQRT_LONG(n) (((n)<SQRT_LONG_MAX)&&((n)>=-SQRT_LONG_MAX)) if (FIT_SQRT_LONG(a) && FIT_SQRT_LONG(b)) return LONG2FIX(a*b); c = a * b; |