use the variable 'err'

This commit is contained in:
Francois Perrad 2016-07-25 18:18:18 +02:00 committed by Karel Miko
parent 31f88a9c9b
commit 79d6e61aca

View File

@ -38,7 +38,7 @@ int ccm_add_aad(ccm_state *ccm,
if (ccm->x == 16) {
/* full block so let's encrypt it */
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
return CRYPT_ERROR;
return err;
}
ccm->x = 0;
}
@ -49,7 +49,7 @@ int ccm_add_aad(ccm_state *ccm,
if (ccm->aadlen == ccm->current_aadlen) {
if (ccm->x != 0) {
if ((err = cipher_descriptor[ccm->cipher].ecb_encrypt(ccm->PAD, ccm->PAD, &ccm->K)) != CRYPT_OK) {
return CRYPT_ERROR;
return err;
}
}
ccm->x = 0;