Skip to content

Commit

Permalink
Resolved LeastAuthority issues 1 (minor) and 2 (suggestion)
Browse files Browse the repository at this point in the history
    * Fixed indentation in handleApdu switch
    * Adopted suggested use of void on functions taking no arguments
  • Loading branch information
jspada committed Jan 7, 2021
1 parent 20c09a2 commit 0e59862
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/get_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
static uint32_t _account = 0;
static char _address[MINA_ADDRESS_LEN];

static uint8_t set_result_get_address()
static uint8_t set_result_get_address(void)
{
uint8_t tx = 0;
assert(strlen(_address) == MINA_ADDRESS_LEN - 1);
Expand All @@ -16,7 +16,7 @@ static uint8_t set_result_get_address()
return tx;
}

static void gen_address()
static void gen_address(void)
{
if (_address[0] == '\0')
{
Expand Down
4 changes: 2 additions & 2 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ void handleApdu(volatile unsigned int *flags, volatile unsigned int *tx) {
dataLength, flags, tx);
break;

case INS_SIGN_TX:
case INS_SIGN_TX:
handle_sign_tx(G_io_apdu_buffer[OFFSET_P1],
G_io_apdu_buffer[OFFSET_P2],
G_io_apdu_buffer + OFFSET_CDATA,
Expand Down Expand Up @@ -267,7 +267,7 @@ void app_exit(void) {
END_TRY_L(exit);
}

void nv_app_state_init(){
void nv_app_state_init(void) {
if (N_storage.initialized != 0x01) {
internalStorage_t storage;
storage.initialized = 0x01;
Expand Down
4 changes: 2 additions & 2 deletions src/sign_tx.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ static struct ui_t {
char receiver_title[9];
} _ui;

static uint8_t set_result_get_signature()
static uint8_t set_result_get_signature(void)
{
uint8_t tx = 0;
os_memmove(G_io_apdu_buffer + tx, _sig_hex, sizeof(_sig_hex));
tx += sizeof(_sig_hex);
return tx;
}

static void sign_transaction()
static void sign_transaction(void)
{
BEGIN_TRY {
TRY {
Expand Down

0 comments on commit 0e59862

Please sign in to comment.