1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-19 18:15:18 -07:00

Add explicit signed/unsigned conversion

This commit is contained in:
Frank Denis 2015-10-24 18:59:15 +02:00
parent 1ec3d7f5aa
commit 94da855b8d
2 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ void fe_cswap(fe f,fe g,unsigned int b)
crypto_int32 x7 = f7 ^ g7;
crypto_int32 x8 = f8 ^ g8;
crypto_int32 x9 = f9 ^ g9;
b = -b;
b = (unsigned int) (- (int) b);
x0 &= b;
x1 &= b;
x2 &= b;

View File

@ -39,7 +39,7 @@ void fe_cmov(fe f,const fe g,unsigned int b)
crypto_int32 x7 = f7 ^ g7;
crypto_int32 x8 = f8 ^ g8;
crypto_int32 x9 = f9 ^ g9;
b = -b;
b = (unsigned int) (- (int) b);
x0 &= b;
x1 &= b;
x2 &= b;