From e25f1701e45bd3facb25b20190111be779ccdacc Mon Sep 17 00:00:00 2001 From: Francois Perrad Date: Sun, 25 Oct 2015 16:21:17 +0100 Subject: [PATCH] explicit condition (part H) --- tommath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tommath.h b/tommath.h index 742bb9a..5dcfdb6 100644 --- a/tommath.h +++ b/tommath.h @@ -248,7 +248,7 @@ int mp_init_size(mp_int *a, int size); #define mp_iszero(a) (((a)->used == 0) ? MP_YES : MP_NO) #define mp_iseven(a) ((((a)->used > 0) && (((a)->dp[0] & 1) == 0)) ? MP_YES : MP_NO) #define mp_isodd(a) ((((a)->used > 0) && (((a)->dp[0] & 1) == 1)) ? MP_YES : MP_NO) -#define mp_isneg(a) (((a)->sign) ? MP_YES : MP_NO) +#define mp_isneg(a) (((a)->sign != 0) ? MP_YES : MP_NO) /* set to zero */ void mp_zero(mp_int *a);