Skip to content

Commit 97a9652

Browse files
author
Moran Peker
committed
Use less stack
1 parent 4a2b06e commit 97a9652

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

components/TARGET_PSA/services/attestation/COMPONENT_SPE/psa_attestation_partition.c

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,11 @@
2828
#include <string.h>
2929
#include "psa/crypto.h"
3030

31-
#endif
32-
3331
int32_t g_caller_id = 0;
3432

35-
static void set_caller_id(psa_msg_t msg)
33+
static void set_caller_id(psa_msg_t *msg)
3634
{
37-
g_caller_id = psa_identity(msg.handle);
35+
g_caller_id = psa_identity(msg->handle);
3836
}
3937

4038
// ------------------------- Partition's Main Thread ---------------------------
@@ -84,7 +82,7 @@ static void psa_attest_get_token(void)
8482
break;
8583
}
8684

87-
set_caller_id(msg);
85+
set_caller_id(&msg);
8886
status = initial_attest_get_token(in_vec, 1, out_vec, 1);
8987
if (status == PSA_ATTEST_ERR_SUCCESS) {
9088
psa_write(msg.handle, 0, out_vec[0].base, out_vec[0].len);
@@ -134,7 +132,7 @@ static void psa_attest_get_token_size(void)
134132
break;
135133
}
136134

137-
set_caller_id(msg);
135+
set_caller_id(&msg);
138136
status = initial_attest_get_token_size(in_vec, 1, out_vec, 1);
139137
if (status == PSA_ATTEST_ERR_SUCCESS) {
140138
psa_write(msg.handle, 0, out_vec[0].base, out_vec[0].len);

0 commit comments

Comments
 (0)