From c57b654a3ee1ed147009d7b9c3507f9d1c61ecaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20P=C3=A9gouri=C3=A9-Gonnard?= Date: Mon, 25 Nov 2013 16:02:53 +0100 Subject: [PATCH] Use t_uint rather than uintXX_t when appropriate --- library/ecp.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/library/ecp.c b/library/ecp.c index 7b7d079a8..0c66d352d 100644 --- a/library/ecp.c +++ b/library/ecp.c @@ -1781,17 +1781,17 @@ cleanup: ( N->p[4*j+1] << 8 ) | \ ( N->p[4*j+2] << 16 ) | \ ( N->p[4*j+3] << 24 ) -#define STORE32 N->p[4*i+0] = (uint8_t)( cur ); \ - N->p[4*i+1] = (uint8_t)( cur >> 8 ); \ - N->p[4*i+2] = (uint8_t)( cur >> 16 ); \ - N->p[4*i+3] = (uint8_t)( cur >> 24 ); +#define STORE32 N->p[4*i+0] = (t_uint)( cur ); \ + N->p[4*i+1] = (t_uint)( cur >> 8 ); \ + N->p[4*i+2] = (t_uint)( cur >> 16 ); \ + N->p[4*i+3] = (t_uint)( cur >> 24 ); #elif defined(POLARSSL_HAVE_INT16) /* 16 bit */ #define MAX32 N->n / 2 #define A( j ) (uint32_t)( N->p[2*j] ) | ( N->p[2*j+1] << 16 ) -#define STORE32 N->p[2*i+0] = (uint16_t)( cur ); \ - N->p[2*i+1] = (uint16_t)( cur >> 16 ); +#define STORE32 N->p[2*i+0] = (t_uint)( cur ); \ + N->p[2*i+1] = (t_uint)( cur >> 16 ); #elif defined(POLARSSL_HAVE_INT32) /* 32 bit */ @@ -1806,10 +1806,10 @@ cleanup: #define STORE32 \ if( i % 2 ) { \ N->p[i/2] &= 0x00000000FFFFFFFF; \ - N->p[i/2] |= ((uint64_t) cur) << 32; \ + N->p[i/2] |= ((t_uint) cur) << 32; \ } else { \ N->p[i/2] &= 0xFFFFFFFF00000000; \ - N->p[i/2] |= (uint64_t) cur; \ + N->p[i/2] |= (t_uint) cur; \ } #endif /* sizeof( t_uint ) */