From 0988d80d70a06b9694664141f7068966d91caf3d Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Fri, 25 Dec 2009 01:11:11 +0100 Subject: [PATCH] Fix constant (-2^31) --- test/tstodr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/tstodr.c b/test/tstodr.c index 3d722ed..3f6fecd 100644 --- a/test/tstodr.c +++ b/test/tstodr.c @@ -223,7 +223,7 @@ static void tst_berint(ODR encode, ODR decode) ber_integer(decode, &ret_val); YAZ_CHECK_EQ(ret_val, 2147483647); - val = -2147483648L; /* -2^31 */ + val = (Odr_int) -2147483647L -1; /* -2^31 */ odr_reset(encode); r = ber_integer(encode, &val); YAZ_CHECK_EQ(r, 1); @@ -239,7 +239,7 @@ static void tst_berint(ODR encode, ODR decode) odr_reset(decode); odr_setbuf(decode, buf, len, 0); ber_integer(decode, &ret_val); - YAZ_CHECK_EQ(ret_val, -2147483648L); + YAZ_CHECK_EQ(ret_val, (Odr_int) -2147483647L -1); val = (Odr_int) 2 * 2147483648UL; /* 2^32 */ odr_reset(encode); -- 1.7.10.4