Skip to content

Commit 7d92550

Browse files
committed
[NUC472/M487] Remove superfluous code in AES alter.
1 parent 116b14a commit 7d92550

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

features/mbedtls/targets/TARGET_NUVOTON/TARGET_M480/aes/aes_alt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,8 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
274274
while( length > 0 ) {
275275
blockChainLen = (length > MAX_DMA_CHAIN_SIZE) ? MAX_DMA_CHAIN_SIZE : length;
276276

277-
if( mode == MBEDTLS_AES_ENCRYPT ) {
278-
__nvt_aes_crypt(ctx, input, output, blockChainLen);
279-
} else {
280-
__nvt_aes_crypt(ctx, input, output, blockChainLen);
281-
}
277+
__nvt_aes_crypt(ctx, input, output, blockChainLen);
278+
282279
length -= blockChainLen;
283280
input += blockChainLen;
284281
output += blockChainLen;

features/mbedtls/targets/TARGET_NUVOTON/TARGET_NUC472/aes/aes_alt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -274,11 +274,8 @@ int mbedtls_aes_crypt_cbc( mbedtls_aes_context *ctx,
274274
while( length > 0 ) {
275275
blockChainLen = (length > MAX_DMA_CHAIN_SIZE) ? MAX_DMA_CHAIN_SIZE : length;
276276

277-
if( mode == MBEDTLS_AES_ENCRYPT ) {
278-
__nvt_aes_crypt(ctx, input, output, blockChainLen);
279-
} else {
280-
__nvt_aes_crypt(ctx, input, output, blockChainLen);
281-
}
277+
__nvt_aes_crypt(ctx, input, output, blockChainLen);
278+
282279
length -= blockChainLen;
283280
input += blockChainLen;
284281
output += blockChainLen;

0 commit comments

Comments
 (0)