From: Peter Maydell Date: Wed, 11 Mar 2015 13:21:06 +0000 (+0000) Subject: bitops.h: sextract64() return type should be int64_t, not uint64_t X-Git-Tag: TizenStudio_2.0_p2.3.2~208^2~309^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f9950520a115acf9c0a209f0befa45758ad0215;p=sdk%2Femulator%2Fqemu.git bitops.h: sextract64() return type should be int64_t, not uint64_t The documentation for sextract64() claims that the return type is an int64_t, but the code itself disagrees. Fix the return type to conform to the documentation and to bring it into line with sextract32(), which returns int32_t. Signed-off-by: Peter Maydell Reviewed-by: Richard Henderson Message-id: 1423231328-15662-1-git-send-email-peter.maydell@linaro.org --- diff --git a/include/qemu/bitops.h b/include/qemu/bitops.h index 181bd46..90ca8df 100644 --- a/include/qemu/bitops.h +++ b/include/qemu/bitops.h @@ -354,7 +354,7 @@ static inline int32_t sextract32(uint32_t value, int start, int length) * Returns: the sign extended value of the bit field extracted from the * input value. */ -static inline uint64_t sextract64(uint64_t value, int start, int length) +static inline int64_t sextract64(uint64_t value, int start, int length) { assert(start >= 0 && length > 0 && length <= 64 - start); /* Note that this implementation relies on right shift of signed