summaryrefslogtreecommitdiff
path: root/bignum.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-21 16:40:02 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-08-21 16:40:02 +0000
commit3d23725ab9b0a01e747b78c46473c3bfa3ff31dd (patch)
treef64f748a476646207a0c99dd83feff815c29ddc9 /bignum.c
parent2ed9b46b4f2dee7be51554d42745a74fa3fdf739 (diff)
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/trunk@36763 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 fc713a00cd..3f59b8edf9 100644
--- a/bignum.c
+++ b/bignum.c
@@ -2812,7 +2812,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 > 0 && !zds[ny-1]) --ny;
if (dd) {
t2 = 0; i = ny;
while(i--) {