Skip to content
Browse files

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
  • Loading branch information...
1 parent 2ed9b46 commit 3d23725ab9b0a01e747b78c46473c3bfa3ff31dd @nobu nobu committed Aug 21, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 bignum.c
View
2 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--) {

0 comments on commit 3d23725

Please sign in to comment.
Something went wrong with that request. Please try again.