Skip to content

Commit

Permalink
consistency: use pre-increment rather than post-increment throughought
Browse files Browse the repository at this point in the history
  • Loading branch information
greenaddress authored and JamieDriver committed Dec 6, 2023
1 parent 2e6eb62 commit 8831723
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions main/gui.c
Original file line number Diff line number Diff line change
Expand Up @@ -913,7 +913,7 @@ static void make_split_node(
// copy the values
data->values = JADE_CALLOC(1, sizeof(uint8_t) * parts);

for (uint8_t i = 0; i < parts; i++) {
for (uint8_t i = 0; i < parts; ++i) {
data->values[i] = va_arg(values, uint32_t);
};

Expand Down Expand Up @@ -1704,7 +1704,7 @@ static void render_vsplit(gui_view_node_t* node, dispWin_t constraints, uint8_t

render_node(ptr, child_constraints, depth + 1);

count++;
++count;
y = child_constraints.y2;
ptr = ptr->sibling;
}
Expand All @@ -1731,7 +1731,7 @@ static void render_hsplit(gui_view_node_t* node, dispWin_t constraints, uint8_t

render_node(ptr, child_constraints, depth + 1);

count++;
++count;
x = child_constraints.x2;
ptr = ptr->sibling;
}
Expand Down
2 changes: 1 addition & 1 deletion main/ui/dashboard.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ gui_activity_t* make_legal_certifications_activity(void)
link_activity_t page_act = {};
linked_activities_info_t act_info = {};

for (size_t j = 0; j <= MAX_LEGAL_PAGE; j++) {
for (size_t j = 0; j <= MAX_LEGAL_PAGE; ++j) {
make_legal_page(&page_act, j);
gui_chain_activities(&page_act, &act_info);
}
Expand Down
2 changes: 1 addition & 1 deletion main/ui/mnemonic.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ void make_show_mnemonic_activities(
linked_activities_info_t act_info = {};

const size_t npages = nwords / 4; // 4 words per page
for (size_t j = 0; j < npages; j++) {
for (size_t j = 0; j < npages; ++j) {
make_show_new_mnemonic_page(
&page_act, nwords, j * 4, words[j * 4], words[j * 4 + 1], words[j * 4 + 2], words[j * 4 + 3]);
gui_chain_activities(&page_act, &act_info);
Expand Down
2 changes: 1 addition & 1 deletion main/utils/urldecode.c
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bool urldecode(const char* src, const size_t src_len, char* dest, const size_t d
} else if (*src == '+') {
// Encoded <space>
*dest++ = ' ';
src++;
++src;
} else {
// Copy across
*dest++ = *src++;
Expand Down

0 comments on commit 8831723

Please sign in to comment.