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:
parent
206a0fc75d
commit
6402cbbbfd
@ -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] */
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user