Skip to content

Commit 9501be7

Browse files
Cleanup sources
- Remove useless header file - Fix bit-field init - Fix parameters casting
1 parent e6f31c3 commit 9501be7

File tree

8 files changed

+10
-13
lines changed

8 files changed

+10
-13
lines changed

src/features/signMessageEIP712/filtering.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -950,8 +950,8 @@ bool filtering_trusted_name(const uint8_t *payload,
950950
}
951951
hash_filtering_path((cx_hash_t *) &hash_ctx, discarded, path_crc);
952952
hash_nbytes((uint8_t *) name, sizeof(char) * name_len, (cx_hash_t *) &hash_ctx);
953-
hash_nbytes(types, type_count, (cx_hash_t *) &hash_ctx);
954-
hash_nbytes(sources, source_count, (cx_hash_t *) &hash_ctx);
953+
hash_nbytes((uint8_t *) types, type_count, (cx_hash_t *) &hash_ctx);
954+
hash_nbytes((uint8_t *) sources, source_count, (cx_hash_t *) &hash_ctx);
955955
if (!sig_verif_end(&hash_ctx, sig, sig_len)) {
956956
return false;
957957
}

src/features/signMessageEIP712/ui_logic.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1297,7 +1297,7 @@ void ui_712_push_pairs(void) {
12971297
tx_idx++;
12981298
// Replace "nn of mm" placeholder, initialized in ui_712_set_intent()
12991299
snprintf(tmp->value, N_OF_M_LENGTH, "%d of %d", tx_idx, txContext.batch_nb_tx);
1300-
g_pairs[pair].centeredInfo = 1;
1300+
g_pairs[pair].centeredInfo = true;
13011301
}
13021302
g_pairs[pair].item = tmp->key;
13031303
g_pairs[pair].value = tmp->value;
@@ -1308,7 +1308,7 @@ void ui_712_push_pairs(void) {
13081308
pair++;
13091309
if ((tmp->end_intent) && (txContext.batch_nb_tx > 1)) {
13101310
// End of batch transaction : start next info on full page
1311-
g_pairs[pair].forcePageStart = 1;
1311+
g_pairs[pair].forcePageStart = true;
13121312
}
13131313
tmp = (s_ui_712_pair *) ((s_flist_node *) tmp)->next;
13141314
}
@@ -1320,7 +1320,7 @@ void ui_712_push_pairs(void) {
13201320
}
13211321
// Prepare the pairs list with the hashes
13221322
eip712_format_hash(pair);
1323-
g_pairs[pair].forcePageStart = 1;
1323+
g_pairs[pair].forcePageStart = true;
13241324
}
13251325
}
13261326

src/main.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
#include "io.h"
2424

2525
#include "parser.h"
26-
#include "glyphs.h"
2726
#include "common_utils.h"
2827

2928
#include "eth_swap_utils.h"

src/nbgl/ui_approve_tx.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ static void setTagValuePairs(bool displayNetwork, bool fromPlugin) {
171171
extension->fullValue = strings.common.toAddress;
172172
extension->explanation = strings.common.toAddress;
173173
g_pairs[nbPairs].extension = extension;
174-
g_pairs[nbPairs].aliasValue = 1;
174+
g_pairs[nbPairs].aliasValue = true;
175175
} else {
176176
g_pairs[nbPairs].value = strings.common.toAddress;
177177
}

src/nbgl/ui_gcs.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ bool ui_gcs(void) {
338338
} else {
339339
ext->backText = app_mem_strdup(ext->backText);
340340
}
341-
g_pairs[pair].aliasValue = 1;
341+
g_pairs[pair].aliasValue = true;
342342
pair++;
343343

344344
// TX fields
@@ -354,15 +354,15 @@ bool ui_gcs(void) {
354354
g_pairs[pair].item = app_mem_strdup("Review transaction");
355355
g_pairs[pair].value = app_mem_strdup(tmp_buf);
356356
index_allocated[pair] = true;
357-
g_pairs[pair].centeredInfo = 1;
357+
g_pairs[pair].centeredInfo = true;
358358
pair++;
359359
}
360360
g_pairs[pair].item = field->key;
361361
g_pairs[pair].value = field->value;
362362
pair++;
363363
if ((field->end_intent) && (txContext.batch_nb_tx > 1)) {
364364
// End of batch transaction : start next info on full page
365-
g_pairs[pair].forcePageStart = 1;
365+
g_pairs[pair].forcePageStart = true;
366366
}
367367
}
368368

src/nbgl/ui_nbgl.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include "nbgl_use_case.h"
44
#include "shared_context.h"
5-
#include "glyphs.h"
65

76
#ifdef SCREEN_SIZE_WALLET
87
#define ICON_APP_WARNING LARGE_WARNING_ICON

src/nbgl/ui_safe_account.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static void setTagValuePairs(void) {
152152
nbPairs++;
153153
g_pairs[nbPairs].item = "Threshold";
154154
g_pairs[nbPairs].value = strings.tmp.tmp + ADDRESS_LENGTH_STR;
155-
g_pairs[nbPairs].aliasValue = 1;
155+
g_pairs[nbPairs].aliasValue = true;
156156
g_pairs[nbPairs].extension = &extensions[1];
157157
extensions[1].aliasType = TAG_VALUE_LIST_ALIAS;
158158
extensions[1].title = "";

src/nbgl/ui_tx_simulation.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "apdu_constants.h"
22
#include "utils.h"
33
#include "nbgl_use_case.h"
4-
#include "glyphs.h"
54
#include "ui_nbgl.h"
65
#include "ui_callbacks.h"
76
#include "ui_callbacks.h"

0 commit comments

Comments
 (0)