Skip to content

Commit 02b88c0

Browse files
committed
Move variable to its usage block
1 parent 918e00c commit 02b88c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/tpm.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1539,15 +1539,14 @@ int wolfBoot_tpm2_clear(void)
15391539
int wolfBoot_check_rot(int key_slot, uint8_t* pubkey_hint)
15401540
{
15411541
int rc;
1542-
size_t auth_sz;
15431542
uint8_t digest[WOLFBOOT_SHA_DIGEST_SIZE];
15441543
uint32_t digestSz = WOLFBOOT_SHA_DIGEST_SIZE;
15451544
WOLFTPM2_NV nv;
15461545

15471546
memset(&nv, 0, sizeof(nv));
15481547
nv.handle.hndl = WOLFBOOT_TPM_KEYSTORE_NV_BASE + key_slot;
15491548
#ifdef WOLFBOOT_TPM_KEYSTORE_AUTH
1550-
auth_sz = strlen(WOLFBOOT_TPM_KEYSTORE_AUTH);
1549+
size_t auth_sz = strlen(WOLFBOOT_TPM_KEYSTORE_AUTH);
15511550
if (auth_sz > (size_t)UINT16_MAX ||
15521551
auth_sz > sizeof(nv.handle.auth.buffer))
15531552
return BAD_FUNC_ARG;

0 commit comments

Comments
 (0)