diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-06-22 13:04:16 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@redhat.com> | 2017-08-31 12:29:07 +0200 |
commit | 6402cbbbfd18322df8914ffc320b5e122399096b (patch) | |
tree | 88b16010e6a3a687bb0a79b2dcc6740c138c4694 | |
parent | 206a0fc75d5f54886c1b3f3a65782a75e36b6b97 (diff) |
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>
-rw-r--r-- | libdecnumber/decNumber.c | 2 |
1 files changed, 1 insertions, 1 deletions
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] */ |