decnumber: use DIV_ROUND_UP

I used the clang-tidy qemu-round check to generate the fix:
https://github.com/elmarco/clang-tools-extra

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Richard Henderson <rth@twiddle.net>
This commit is contained in:
Marc-André Lureau 2017-06-22 13:04:16 +02:00
parent 206a0fc75d
commit 6402cbbbfd

View File

@ -4775,7 +4775,7 @@ static decNumber * decDivideOp(decNumber *res,
half=*up & 0x01;
*up/=2; /* [shift] */
if (!half) continue;
*(up-1)+=(DECDPUNMAX+1)/2;
*(up-1)+=DIV_ROUND_UP(DECDPUNMAX, 2);
}
/* [accunits still describes the original remainder length] */