mirror of
https://github.com/cuberite/polarssl.git
synced 2025-09-30 17:09:41 -04:00
Fix IAR change of sign warning
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
This commit is contained in:
parent
7f288566c3
commit
73d8591f7f
@ -386,7 +386,7 @@ static inline mbedtls_mpi_uint mpi_sint_abs(mbedtls_mpi_sint z)
|
|||||||
|
|
||||||
/* Convert x to a sign, i.e. to 1, if x is positive, or -1, if x is negative.
|
/* Convert x to a sign, i.e. to 1, if x is positive, or -1, if x is negative.
|
||||||
* This looks awkward but generates smaller code than (x < 0 ? -1 : 1) */
|
* This looks awkward but generates smaller code than (x < 0 ? -1 : 1) */
|
||||||
#define TO_SIGN(x) ((((mbedtls_mpi_uint) x) >> (biL - 1)) * -2 + 1)
|
#define TO_SIGN(x) ((mbedtls_mpi_sint) (((mbedtls_mpi_uint) x) >> (biL - 1)) * -2 + 1)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set value from integer
|
* Set value from integer
|
||||||
|
Loading…
x
Reference in New Issue
Block a user