|
From: | Richard Henderson |
Subject: | Re: [PATCH v2 02/19] host-utils: move abs64() to host-utils as uabs64() |
Date: | Tue, 31 Aug 2021 10:11:24 -0700 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 8/31/21 9:39 AM, Luis Pires wrote:
Move abs64 to host-utils as uabs64, so it can be used elsewhere. The function was renamed to uabs64 and modified to return an unsigned value. This avoids the undefined behavior for common abs implementations, where abs of the most negative value is undefined. Signed-off-by: Luis Pires<luis.pires@eldorado.org.br> --- hw/i386/kvm/i8254.c | 7 +------ include/qemu/host-utils.h | 8 ++++++++ 2 files changed, 9 insertions(+), 6 deletions(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org> r~
[Prev in Thread] | Current Thread | [Next in Thread] |