Skip to content

Commit

Permalink
MU: Remove unneeded cast in TPM2B_UNMARSHAL.
Browse files Browse the repository at this point in the history
An uneeded cast was removed, because the name of the used buffer
was passed to TPM2B_UNMARSHAL and could be used.

Signed-off-by: Juergen Repp <juergen_repp@web.de>
  • Loading branch information
JuergenReppSIT committed Nov 28, 2024
1 parent 41b94ad commit 59df5f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/tss2-mu/tpm2b-types.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ TSS2_RC Tss2_MU_##type##_Unmarshal(uint8_t const buffer[], size_t buffer_size, \
\
if (dest != NULL) { \
dest->size = size; \
memcpy(((TPM2B *)dest)->buffer, &buffer[local_offset], size); \
memcpy(&dest->buf_name, &buffer[local_offset], size); \
} \
local_offset += size; \
if (offset != NULL) { \
Expand Down

0 comments on commit 59df5f6

Please sign in to comment.