mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2024-11-23 02:05:45 +01:00
mpi_lt_mpi_ct: make use of unsigned consistent
This commit is contained in:
parent
7a34bcffef
commit
b11ce0ec2d
@ -1106,7 +1106,7 @@ int mbedtls_mpi_lt_mpi_ct( const mbedtls_mpi *X, const mbedtls_mpi *Y,
|
|||||||
unsigned *ret )
|
unsigned *ret )
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
unsigned int cond, done, sign_X, sign_Y;
|
unsigned cond, done, sign_X, sign_Y;
|
||||||
|
|
||||||
MPI_VALIDATE_RET( X != NULL );
|
MPI_VALIDATE_RET( X != NULL );
|
||||||
MPI_VALIDATE_RET( Y != NULL );
|
MPI_VALIDATE_RET( Y != NULL );
|
||||||
@ -1119,9 +1119,9 @@ int mbedtls_mpi_lt_mpi_ct( const mbedtls_mpi *X, const mbedtls_mpi *Y,
|
|||||||
* Get sign bits of the signs.
|
* Get sign bits of the signs.
|
||||||
*/
|
*/
|
||||||
sign_X = X->s;
|
sign_X = X->s;
|
||||||
sign_X = sign_X >> ( sizeof( unsigned int ) * 8 - 1 );
|
sign_X = sign_X >> ( sizeof( unsigned ) * 8 - 1 );
|
||||||
sign_Y = Y->s;
|
sign_Y = Y->s;
|
||||||
sign_Y = sign_Y >> ( sizeof( unsigned int ) * 8 - 1 );
|
sign_Y = sign_Y >> ( sizeof( unsigned ) * 8 - 1 );
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If the signs are different, then the positive operand is the bigger.
|
* If the signs are different, then the positive operand is the bigger.
|
||||||
|
Loading…
Reference in New Issue
Block a user