Skip to content

Commit 436a1c4

Browse files
committed
Addressed copilot's comments
1 parent eadb860 commit 436a1c4

5 files changed

Lines changed: 11 additions & 15 deletions

File tree

hal/stm32l5.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -181,10 +181,10 @@
181181
#define FLASH_NS_SR (*(volatile uint32_t *)(FLASH_NS_BASE + 0x20))
182182
#define FLASH_NS_CR (*(volatile uint32_t *)(FLASH_NS_BASE + 0x28))
183183

184-
#define TZSC_PRIVCFGR1 *((uint32_t *)(0x50032420))
185-
#define TZSC_PRIVCFG1_LPUARTPRIV (1 << 21)
186-
#define TZSC_SECCFGR1 *((uint32_t *)(0x50032410))
187-
#define TZSC_SECCFGR1_USART3SEC (1 << 11)
184+
#define TZSC_PRIVCFGR1 (*(volatile uint32_t *)(0x50032420))
185+
#define TZSC_PRIVCFG1_LPUARTPRIV (1u << 21)
186+
#define TZSC_SECCFGR1 (*(volatile uint32_t *)(0x50032410))
187+
#define TZSC_SECCFGR1_USART3SEC (1u << 11)
188188

189189

190190
#else

lib/wolfPKCS11

Submodule wolfPKCS11 updated 58 files

lib/wolfTPM

Submodule wolfTPM updated 87 files

test-app/test_pkcs11.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -500,9 +500,8 @@ int test_pkcs11_start(void)
500500
ret = test_pkcs11_open_user_session(&session);
501501
}
502502
if (ret < 0) {
503-
(void)wolfpkcs11nsFunctionList.C_Finalize(NULL);
504-
wolfCrypt_Cleanup();
505-
return -1;
503+
ret = -1;
504+
goto cleanup;
506505
}
507506

508507
key_state = test_pkcs11_find_keypair(session, &pub_obj, &priv_obj);
@@ -513,11 +512,8 @@ int test_pkcs11_start(void)
513512

514513
data_state = test_pkcs11_find_data_obj(session, &data_obj);
515514
if (data_state < 0) {
516-
(void)wolfpkcs11nsFunctionList.C_Logout(session);
517-
(void)wolfpkcs11nsFunctionList.C_CloseSession(session);
518-
(void)wolfpkcs11nsFunctionList.C_Finalize(NULL);
519-
wolfCrypt_Cleanup();
520-
return -1;
515+
ret = -1;
516+
goto cleanup;
521517
}
522518

523519
if (key_state == 1 && data_state == 1) {

0 commit comments

Comments
 (0)