summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 07:08:57 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-06-26 07:08:57 +0000
commit9f170c5ceabaefcbb7b9cbc0802071ed6b1d2517 (patch)
treed753e6a26af1315d7e286d205a23703e6450fb93 /bignum.c
parent301823549e9efe655f8956392c2a372b9d7b72c1 (diff)
merge revision(s) 36763,36764: [Backport #8528]
bignum.c: suppress an empty-body warning * bignum.c (bigdivrem): move decrement to the loop body, to suppress an empty-body warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@41642 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'bignum.c')
-rw-r--r--bignum.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bignum.c b/bignum.c
index 85f739d2bb..2f0eca7fca 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2729,7 +2729,7 @@ bigdivrem(VALUE x, VALUE y, volatile VALUE *divp, volatile VALUE *modp)
if (modp) { /* normalize remainder */
*modp = zz = rb_big_clone(z);
zds = BDIGITS(zz);
- while (--ny && !zds[ny]); ++ny;
+ while (ny > 1 && !zds[ny-1]) --ny;
if (dd) {
t2 = 0; i = ny;
while(i--) {