diff options
author | Marc-André Lureau | 2017-06-22 13:04:16 +0200 |
---|---|---|
committer | Marc-André Lureau | 2017-08-31 12:29:07 +0200 |
commit | 6402cbbbfd18322df8914ffc320b5e122399096b (patch) | |
tree | 88b16010e6a3a687bb0a79b2dcc6740c138c4694 /libdecnumber | |
parent | kvm: use DIV_ROUND_UP (diff) | |
download | qemu-6402cbbbfd18322df8914ffc320b5e122399096b.tar.gz qemu-6402cbbbfd18322df8914ffc320b5e122399096b.tar.xz qemu-6402cbbbfd18322df8914ffc320b5e122399096b.zip |
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>
Diffstat (limited to 'libdecnumber')
-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] */ |