summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authormichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-16 07:38:40 +0000
committermichal <michal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-01-16 07:38:40 +0000
commit4e13d36561868d78e9e5ff9b24aba67d418c67ed (patch)
tree07808bdd94888f12e0e1b1a6f52777f213d50b91 /bignum.c
parent9df466b287471d386f962ea41cf49c40f2059c8b (diff)
-Wall cleanups (removed unused vars, no 'code has no effect' warnings)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3346 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/bignum.c b/bignum.c
index 99bed73..c010bf7 100644
--- a/bignum.c
+++ b/bignum.c
@@ -392,10 +392,8 @@ rb_cstr_to_inum(str, base, badcheck)
}
break;
}
- if (*str == '0') { /* squeeze preceeding 0s */
- while (*++str == '0');
- --str;
- }
+ while (*str == '0') str++; /* squeeze preceeding 0s */
+
len *= strlen(str)*sizeof(char);
if (len <= (sizeof(VALUE)*CHAR_BIT)) {
@@ -1125,7 +1123,7 @@ bigdivrem(x, y, divp, modp)
yds = BDIGITS(y);
if (ny == 0 && yds[0] == 0) rb_num_zerodiv();
- if (nx < ny || nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1]) {
+ if (nx < ny || (nx == ny && BDIGITS(x)[nx - 1] < BDIGITS(y)[ny - 1])) {
if (divp) *divp = rb_int2big(0);
if (modp) *modp = x;
return;