[NUC472/M487] Fix warning in crypto

pull/5812/head
ccli8 2018-01-22 10:32:36 +08:00
parent a68750473c
commit 160f75d536
2 changed files with 7 additions and 7 deletions

View File

@ -289,22 +289,22 @@ void CRYPTO_IRQHandler()
{ {
uint32_t intsts; uint32_t intsts;
if ((intsts = PRNG_GET_INT_FLAG())) { if ((intsts = PRNG_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_prng_done |= CRYPTO_DONE_OK; crypto_prng_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */
PRNG_CLR_INT_FLAG(); PRNG_CLR_INT_FLAG();
} else if ((intsts = AES_GET_INT_FLAG())) { } else if ((intsts = AES_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_aes_done |= CRYPTO_DONE_OK; crypto_aes_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */
AES_CLR_INT_FLAG(); AES_CLR_INT_FLAG();
} else if ((intsts = TDES_GET_INT_FLAG())) { } else if ((intsts = TDES_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_des_done |= CRYPTO_DONE_OK; crypto_des_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */
TDES_CLR_INT_FLAG(); TDES_CLR_INT_FLAG();
} else if ((intsts = ECC_GET_INT_FLAG())) { } else if ((intsts = ECC_GET_INT_FLAG()) != 0) {
/* Check interrupt flags */ /* Check interrupt flags */
if (intsts & CRPT_INTSTS_ECCIF_Msk) { if (intsts & CRPT_INTSTS_ECCIF_Msk) {
/* Done with OK */ /* Done with OK */

View File

@ -256,17 +256,17 @@ void CRYPTO_IRQHandler()
{ {
uint32_t intsts; uint32_t intsts;
if ((intsts = PRNG_GET_INT_FLAG())) { if ((intsts = PRNG_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_prng_done |= CRYPTO_DONE_OK; crypto_prng_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */
PRNG_CLR_INT_FLAG(); PRNG_CLR_INT_FLAG();
} else if ((intsts = AES_GET_INT_FLAG())) { } else if ((intsts = AES_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_aes_done |= CRYPTO_DONE_OK; crypto_aes_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */
AES_CLR_INT_FLAG(); AES_CLR_INT_FLAG();
} else if ((intsts = TDES_GET_INT_FLAG())) { } else if ((intsts = TDES_GET_INT_FLAG()) != 0) {
/* Done with OK */ /* Done with OK */
crypto_des_done |= CRYPTO_DONE_OK; crypto_des_done |= CRYPTO_DONE_OK;
/* Clear interrupt flag */ /* Clear interrupt flag */