Code improvements / Fix warnings
- Fix CodeQL warnings - Port lots of improvements/fixes from PR #225 - replace 'array_hexstr' and '%*H' format by sdk function 'format_hex' - Add 'noreturn' attribute in 'main.c'
This commit is contained in:
@@ -64,7 +64,7 @@ const contract_t CONTRACTS[NUM_CONTRACTS] = {
|
||||
|
||||
bool check_contract(erc20_parameters_t *context) {
|
||||
for (size_t i = 0; i < NUM_CONTRACTS; i++) {
|
||||
contract_t *contract = (contract_t *) PIC(&CONTRACTS[i]);
|
||||
const contract_t *contract = (const contract_t *) PIC(&CONTRACTS[i]);
|
||||
if (memcmp(contract->address, context->destinationAddress, ADDRESS_LENGTH) == 0) {
|
||||
strlcpy(context->contract_name, contract->name, sizeof(context->contract_name));
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user