Fix various Linter issues and mispelling

This commit is contained in:
Charles-Edouard de la Vergne
2024-03-18 17:28:51 +01:00
parent 36ae183a1c
commit f5ea9c51c2
100 changed files with 229 additions and 220 deletions

View File

@@ -444,7 +444,7 @@ static bool check_found_tlv_tags(s_tlv_handler *handlers, int handler_count) {
// prevent missing or duplicated tags
for (int idx = 0; idx < handler_count; ++idx) {
if (handlers[idx].found != 1) {
PRINTF("Found %u occurence(s) of tag 0x%x in TLV!\n",
PRINTF("Found %u occurrence(s) of tag 0x%x in TLV!\n",
handlers[idx].found,
handlers[idx].tag);
return false;

View File

@@ -174,7 +174,7 @@ void handleProvideNFTInformation(uint8_t p1,
}
uint8_t signatureLen = workBuffer[offset];
PRINTF("Sigature len: %d\n", signatureLen);
PRINTF("Signature len: %d\n", signatureLen);
if (signatureLen < MIN_DER_SIG_SIZE || signatureLen > MAX_DER_SIG_SIZE) {
PRINTF("SignatureLen too big or too small. Must be between %d and %d, got %d\n",
MIN_DER_SIG_SIZE,

View File

@@ -58,7 +58,7 @@ typedef bool verificationAlgo(const cx_ecfp_public_key_t *,
// Returns the plugin type of a given plugin name.
// If the plugin name is not a specific known internal plugin, this function default return value is
// `EXERNAL`.
// `EXTERNAL`.
static pluginType_t getPluginType(char *pluginName, uint8_t pluginNameLength) {
if (pluginNameLength == sizeof(ERC721_STR) - 1 &&
strncmp(pluginName, ERC721_STR, pluginNameLength) == 0) {

View File

@@ -173,7 +173,7 @@ static void field_hash_feed_parent(e_type field_type, const uint8_t *const hash)
* @param[in] field_ptr pointer to the struct field definition
* @param[in] data the field value
* @param[in] data_length the value length
* @return whether an error occured or not
* @return whether an error occurred or not
*/
static bool field_hash_domain_special_fields(const void *const field_ptr,
const uint8_t *const data,
@@ -202,7 +202,7 @@ static bool field_hash_domain_special_fields(const void *const field_ptr,
* @param[in] field_ptr pointer to the struct field definition
* @param[in] data the field value
* @param[in] data_length the value length
* @return whether an error occured or not
* @return whether an error occurred or not
*/
static bool field_hash_finalize(const void *const field_ptr,
const uint8_t *const data,

View File

@@ -115,7 +115,7 @@ const void *path_get_field(void) {
/**
* Go down (add) a depth level.
*
* @return whether the push was succesful
* @return whether the push was successful
*/
static bool path_depth_list_push(void) {
if (path_struct == NULL) {

View File

@@ -51,7 +51,7 @@ static bool encode_and_hash_type(const void *const struct_ptr) {
struct_name = get_struct_name(struct_ptr, &struct_name_length);
hash_nbytes((uint8_t *) struct_name, struct_name_length, (cx_hash_t *) &global_sha3);
// opening struct parenthese
// opening struct parentheses
hash_byte('(', (cx_hash_t *) &global_sha3);
field_ptr = get_struct_fields_array(struct_ptr, &fields_count);
@@ -67,7 +67,7 @@ static bool encode_and_hash_type(const void *const struct_ptr) {
field_ptr = get_next_struct_field(field_ptr);
}
// closing struct parenthese
// closing struct parentheses
hash_byte(')', (cx_hash_t *) &global_sha3);
return true;
@@ -107,7 +107,7 @@ static void sort_dependencies(uint8_t deps_count, const void **deps) {
/**
* Find all the dependencies from a given structure
*
* @param[out] deps_count count of how many struct dependencie pointers
* @param[out] deps_count count of how many struct dependency pointers
* @param[in] first_dep pointer to the first dependency pointer
* @param[in] struct_ptr pointer to the struct we are getting the dependencies of
* @return pointer to the first found dependency, \ref NULL otherwise

View File

@@ -48,7 +48,7 @@ static bool ui_712_field_shown(void) {
* @param[in] src_length source buffer size
* @param[in] dst destination buffer
* @param[in] dst_length destination buffer length
* @param[in] explicit_trunc if truncation should be explicitely shown
* @param[in] explicit_trunc if truncation should be explicitly shown
*/
static void ui_712_set_buf(const char *const src,
size_t src_length,
@@ -194,7 +194,7 @@ static void ui_712_format_str(const uint8_t *const data, uint8_t length) {
static const char *get_address_token_ticker(const uint8_t *addr) {
tokenDefinition_t *token;
// Loop over the received token informations
// Loop over the received token information
for (uint8_t token_idx = 0; token_idx < MAX_ITEMS; ++token_idx) {
if (tmpCtx.transactionContext.tokenSet[token_idx] == 1) {
token = &tmpCtx.transactionContext.extraInfo[token_idx].token;

View File

@@ -296,7 +296,7 @@ static void get_public_key(uint8_t *out, uint8_t outLength) {
getEthAddressFromRawKey(raw_pubkey, out);
}
/* Local implmentation of strncasecmp, workaround of the segfaulting base implem
/* Local implementation of strncasecmp, workaround of the segfaulting base implem
* Remove once strncasecmp is fixed
*/
static int strcasecmp_workaround(const char *str1, const char *str2) {