Message ID | 20170713163219.9024-26-marcandre.lureau@redhat.com |
---|---|
State | New |
Headers | show |
On 07/13/2017 06:32 AM, Marc-André Lureau wrote: > 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> > --- > libdecnumber/decNumber.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Richard Henderson <rth@twiddle.net> r~
diff --git a/libdecnumber/decNumber.c b/libdecnumber/decNumber.c index c9e7807f87..8c197023f4 100644 --- a/libdecnumber/decNumber.c +++ b/libdecnumber/decNumber.c @@ -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] */
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> --- libdecnumber/decNumber.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)