From 30f5d359ea352a73af50870db8119eb65d3be493 Mon Sep 17 00:00:00 2001 From: Daniel Jobson Date: Thu, 12 Sep 2024 11:40:07 +0200 Subject: [PATCH] fw: remove address-of operator (&) where it is not needed - `digest` is an array and hence the address of the first element is returned. - This will keep it more consistent with the rest of the code base. - Fixed misspelled comment. --- hw/application_fpga/fw/tk1/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/application_fpga/fw/tk1/main.c b/hw/application_fpga/fw/tk1/main.c index 1c68b59..3b28faa 100644 --- a/hw/application_fpga/fw/tk1/main.c +++ b/hw/application_fpga/fw/tk1/main.c @@ -301,7 +301,7 @@ static enum state loading_commands(const struct frame_header *hdr, // And return the digest in final // response rsp[0] = STATUS_OK; - memcpy_s(&rsp[1], CMDLEN_MAXBYTES - 1, &ctx->digest, + memcpy_s(&rsp[1], CMDLEN_MAXBYTES - 1, ctx->digest, 32); fwreply(*hdr, FW_RSP_LOAD_APP_DATA_READY, rsp); @@ -418,7 +418,7 @@ int main(void) print_hw_version(); - // Let the app know the function adddress for blake2s() + // Let the app know the function address for blake2s() *fw_blake2s_addr = (uint32_t)blake2s; /*@-mustfreeonly@*/