From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38090) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVhTJ-0004yW-5w for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YVhTI-0002hK-Ci for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:53 -0400 Received: from mnementh.archaic.org.uk ([2001:8b0:1d0::1]:55225) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YVhTH-0002gl-UI for qemu-devel@nongnu.org; Wed, 11 Mar 2015 10:18:52 -0400 Received: from pm215 by mnementh.archaic.org.uk with local (Exim 4.80) (envelope-from ) id 1YVhTG-0001zh-P0 for qemu-devel@nongnu.org; Wed, 11 Mar 2015 14:18:50 +0000 From: Peter Maydell Date: Wed, 11 Mar 2015 14:18:50 +0000 Message-Id: <1426083530-7591-11-git-send-email-peter.maydell@linaro.org> In-Reply-To: <1426083530-7591-1-git-send-email-peter.maydell@linaro.org> References: <1426083530-7591-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PULL 10/10] bitops.h: sextract64() return type should be int64_t, not uint64_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org 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 --- include/qemu/bitops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 1.9.1