SiLabs: AES return code fixup and comment cleanup

pull/3497/head
Elms 2020-12-10 20:26:59 -08:00
parent 9ba78eb825
commit 40087f1fd0
2 changed files with 5 additions and 4 deletions

View File

@ -99,7 +99,7 @@ int wc_AesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz)
(uint8_t*)aes->reg,
in,
out);
return (status != SL_STATUS_OK);
return (status != SL_STATUS_OK) ? WC_HW_E : 0;
}
int wc_AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)
@ -112,7 +112,7 @@ int wc_AesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz)
(uint8_t*)aes->reg,
in,
out);
return (status != SL_STATUS_OK);
return (status != SL_STATUS_OK) ? WC_HW_E : 0;
}
#ifdef HAVE_AESGCM

View File

@ -1463,8 +1463,9 @@ extern void uITRON4_free(void *p) ;
(void *)(pmem_2), \
(CPU_SIZE_T)(size))) ? DEF_NO : DEF_YES)
#else
// Work aroud for Micrium OS version 5.8 change in behavior
// that returns DEF_NO for 0 size compare
/* Work around for Micrium OS version 5.8 change in behavior
* that returns DEF_NO for 0 size compare
*/
#define XMEMCMP(pmem_1, pmem_2, size) \
(( (size < 1 ) || \
((CPU_BOOLEAN)Mem_Cmp((void *)(pmem_1), \