From 4800e73590f7b91f19fb3d183c9293ed6bd3c10c Mon Sep 17 00:00:00 2001 From: Carlos Medeiros Date: Thu, 10 Oct 2024 09:51:42 +0100 Subject: [PATCH] remove logs & deadcode --- app/src/blake2s/blake2.h | 20 +++++++++----------- app/src/blake2s/blake2s-ref.c | 3 --- app/src/parser_impl_common.h | 3 --- app/src/review_keys.c | 6 ------ 4 files changed, 9 insertions(+), 23 deletions(-) diff --git a/app/src/blake2s/blake2.h b/app/src/blake2s/blake2.h index c5e8f46..bfd6289 100644 --- a/app/src/blake2s/blake2.h +++ b/app/src/blake2s/blake2.h @@ -55,16 +55,15 @@ typedef struct blake2sp_state__ { } blake2sp_state; BLAKE2_PACKED(struct blake2s_param__ { - uint8_t digest_length; /* 1 */ - uint8_t key_length; /* 2 */ - uint8_t fanout; /* 3 */ - uint8_t depth; /* 4 */ - uint32_t leaf_length; /* 8 */ - uint32_t node_offset; /* 12 */ - uint16_t xof_length; /* 14 */ - uint8_t node_depth; /* 15 */ - uint8_t inner_length; /* 16 */ - /* uint8_t reserved[0]; */ + uint8_t digest_length; /* 1 */ + uint8_t key_length; /* 2 */ + uint8_t fanout; /* 3 */ + uint8_t depth; /* 4 */ + uint32_t leaf_length; /* 8 */ + uint32_t node_offset; /* 12 */ + uint16_t xof_length; /* 14 */ + uint8_t node_depth; /* 15 */ + uint8_t inner_length; /* 16 */ uint8_t salt[BLAKE2S_SALTBYTES]; /* 24 */ uint8_t personal[BLAKE2S_PERSONALBYTES]; /* 32 */ }); @@ -81,7 +80,6 @@ typedef struct blake2xs_state__ { /* Padded structs result in a compile-time error */ enum { BLAKE2_DUMMY_1 = 1 / (int)(sizeof(blake2s_param) == BLAKE2S_OUTBYTES), - // BLAKE2_DUMMY_2 = 1/(int)(sizeof(blake2b_param) == BLAKE2B_OUTBYTES) }; /* Streaming API */ diff --git a/app/src/blake2s/blake2s-ref.c b/app/src/blake2s/blake2s-ref.c index 87c8de9..59347c9 100644 --- a/app/src/blake2s/blake2s-ref.c +++ b/app/src/blake2s/blake2s-ref.c @@ -90,7 +90,6 @@ int blake2s_init(blake2s_state *S, size_t outlen) { store16(&P->xof_length, 0); P->node_depth = 0; P->inner_length = 0; - /* memset(P->reserved, 0, sizeof(P->reserved) ); */ memset(P->salt, 0, sizeof(P->salt)); memset(P->personal, 0, sizeof(P->personal)); return blake2s_init_param(S, P); @@ -114,7 +113,6 @@ int blake2s_init_with_personalization(blake2s_state *S, size_t outlen, const uin store16(&P->xof_length, 0); P->node_depth = 0; P->inner_length = 0; - /* memset(P->reserved, 0, sizeof(P->reserved) ); */ memset(P->salt, 0, sizeof(P->salt)); memset(P->personal, 0, sizeof(P->personal)); memcpy(P->personal, personalization, personalizationlen); @@ -138,7 +136,6 @@ int blake2s_init_key(blake2s_state *S, size_t outlen, const void *key, size_t ke store16(&P->xof_length, 0); P->node_depth = 0; P->inner_length = 0; - /* memset(P->reserved, 0, sizeof(P->reserved) ); */ memset(P->salt, 0, sizeof(P->salt)); memset(P->personal, 0, sizeof(P->personal)); diff --git a/app/src/parser_impl_common.h b/app/src/parser_impl_common.h index 4132b20..ae8ebb6 100644 --- a/app/src/parser_impl_common.h +++ b/app/src/parser_impl_common.h @@ -16,9 +16,6 @@ #pragma once #include "parser_common.h" -// #include -// #include "zxtypes.h" -// #include "parser_txdef.h" #ifdef __cplusplus extern "C" { diff --git a/app/src/review_keys.c b/app/src/review_keys.c index 7845d3d..6eb80b7 100644 --- a/app/src/review_keys.c +++ b/app/src/review_keys.c @@ -40,8 +40,6 @@ zxerr_t getNumItemsPublicAddress(uint8_t *num_items) { zxerr_t getItemPublicAddress(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen, uint8_t pageIdx, uint8_t *pageCount) { - ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx) - switch (displayIdx) { case 0: snprintf(outKey, outKeyLen, "Address"); @@ -74,8 +72,6 @@ zxerr_t getNumItemsProofGenerationKey(uint8_t *num_items) { zxerr_t getItemProofGenerationKey(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen, uint8_t pageIdx, uint8_t *pageCount) { - ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx) - switch (displayIdx) { case 0: snprintf(outKey, outKeyLen, "AuthKey"); @@ -115,8 +111,6 @@ zxerr_t getNumItemsViewKey(uint8_t *num_items) { zxerr_t getItemViewKey(int8_t displayIdx, char *outKey, uint16_t outKeyLen, char *outVal, uint16_t outValLen, uint8_t pageIdx, uint8_t *pageCount) { - ZEMU_LOGF(50, "[addr_getItem] %d/%d\n", displayIdx, pageIdx) - switch (displayIdx) { case 0: snprintf(outKey, outKeyLen, "ViewKey");