Skip to content

Commit 1c01ea9

Browse files
ccli8cmonr
authored andcommitted
Fix warning in crypto
1 parent 0eb6086 commit 1c01ea9

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

targets/TARGET_NUVOTON/TARGET_M480/crypto/crypto-misc.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,22 +289,22 @@ void CRYPTO_IRQHandler()
289289
{
290290
uint32_t intsts;
291291

292-
if ((intsts = PRNG_GET_INT_FLAG())) {
292+
if ((intsts = PRNG_GET_INT_FLAG()) != 0) {
293293
/* Done with OK */
294294
crypto_prng_done |= CRYPTO_DONE_OK;
295295
/* Clear interrupt flag */
296296
PRNG_CLR_INT_FLAG();
297-
} else if ((intsts = AES_GET_INT_FLAG())) {
297+
} else if ((intsts = AES_GET_INT_FLAG()) != 0) {
298298
/* Done with OK */
299299
crypto_aes_done |= CRYPTO_DONE_OK;
300300
/* Clear interrupt flag */
301301
AES_CLR_INT_FLAG();
302-
} else if ((intsts = TDES_GET_INT_FLAG())) {
302+
} else if ((intsts = TDES_GET_INT_FLAG()) != 0) {
303303
/* Done with OK */
304304
crypto_des_done |= CRYPTO_DONE_OK;
305305
/* Clear interrupt flag */
306306
TDES_CLR_INT_FLAG();
307-
} else if ((intsts = ECC_GET_INT_FLAG())) {
307+
} else if ((intsts = ECC_GET_INT_FLAG()) != 0) {
308308
/* Check interrupt flags */
309309
if (intsts & CRPT_INTSTS_ECCIF_Msk) {
310310
/* Done with OK */

targets/TARGET_NUVOTON/TARGET_NUC472/crypto/crypto-misc.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,17 +256,17 @@ void CRYPTO_IRQHandler()
256256
{
257257
uint32_t intsts;
258258

259-
if ((intsts = PRNG_GET_INT_FLAG())) {
259+
if ((intsts = PRNG_GET_INT_FLAG()) != 0) {
260260
/* Done with OK */
261261
crypto_prng_done |= CRYPTO_DONE_OK;
262262
/* Clear interrupt flag */
263263
PRNG_CLR_INT_FLAG();
264-
} else if ((intsts = AES_GET_INT_FLAG())) {
264+
} else if ((intsts = AES_GET_INT_FLAG()) != 0) {
265265
/* Done with OK */
266266
crypto_aes_done |= CRYPTO_DONE_OK;
267267
/* Clear interrupt flag */
268268
AES_CLR_INT_FLAG();
269-
} else if ((intsts = TDES_GET_INT_FLAG())) {
269+
} else if ((intsts = TDES_GET_INT_FLAG()) != 0) {
270270
/* Done with OK */
271271
crypto_des_done |= CRYPTO_DONE_OK;
272272
/* Clear interrupt flag */

0 commit comments

Comments
 (0)