bug: wrong parentheses in condition with assignment

This commit is contained in:
Francois Perrad 2015-12-19 17:50:02 +01:00 committed by Karel Miko
parent 649ef0faef
commit 203087d6d7
2 changed files with 4 additions and 4 deletions

View File

@ -94,8 +94,8 @@ int xts_decrypt(const unsigned char *ct, unsigned long ptlen, unsigned char *pt,
if (cipher_descriptor[xts->cipher].accel_xts_decrypt && lim > 0) { if (cipher_descriptor[xts->cipher].accel_xts_decrypt && lim > 0) {
/* use accelerated decryption for whole blocks */ /* use accelerated decryption for whole blocks */
if ((err = cipher_descriptor[xts->cipher].accel_xts_decrypt(ct, pt, lim, tweak, &xts->key1, &xts->key2) != if ((err = cipher_descriptor[xts->cipher].accel_xts_decrypt(ct, pt, lim, tweak, &xts->key1, &xts->key2)) !=
CRYPT_OK)) { CRYPT_OK) {
return err; return err;
} }
ct += lim * 16; ct += lim * 16;

View File

@ -96,8 +96,8 @@ int xts_encrypt(const unsigned char *pt, unsigned long ptlen, unsigned char *ct,
if (cipher_descriptor[xts->cipher].accel_xts_encrypt && lim > 0) { if (cipher_descriptor[xts->cipher].accel_xts_encrypt && lim > 0) {
/* use accelerated encryption for whole blocks */ /* use accelerated encryption for whole blocks */
if ((err = cipher_descriptor[xts->cipher].accel_xts_encrypt(pt, ct, lim, tweak, &xts->key1, &xts->key2) != if ((err = cipher_descriptor[xts->cipher].accel_xts_encrypt(pt, ct, lim, tweak, &xts->key1, &xts->key2)) !=
CRYPT_OK)) { CRYPT_OK) {
return err; return err;
} }
ct += lim * 16; ct += lim * 16;