summaryrefslogtreecommitdiff
path: root/quantum/process_keycode
diff options
context:
space:
mode:
Diffstat (limited to 'quantum/process_keycode')
-rw-r--r--quantum/process_keycode/process_leader.c2
-rw-r--r--quantum/process_keycode/process_unicode_common.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/quantum/process_keycode/process_leader.c b/quantum/process_keycode/process_leader.c
index ae00b3227a..3593f75f0d 100644
--- a/quantum/process_keycode/process_leader.c
+++ b/quantum/process_keycode/process_leader.c
@@ -58,7 +58,7 @@ bool process_leader(uint16_t keycode, keyrecord_t *record) {
keycode = keycode & 0xFF;
}
# endif // LEADER_KEY_STRICT_KEY_PROCESSING
- if (leader_sequence_size < (sizeof(leader_sequence) / sizeof(leader_sequence[0]))) {
+ if (leader_sequence_size < ARRAY_SIZE(leader_sequence)) {
leader_sequence[leader_sequence_size] = keycode;
leader_sequence_size++;
} else {
diff --git a/quantum/process_keycode/process_unicode_common.c b/quantum/process_keycode/process_unicode_common.c
index 8de31c055c..1c1aab8f48 100644
--- a/quantum/process_keycode/process_unicode_common.c
+++ b/quantum/process_keycode/process_unicode_common.c
@@ -25,7 +25,7 @@ bool unicode_saved_num_lock;
#if UNICODE_SELECTED_MODES != -1
static uint8_t selected[] = {UNICODE_SELECTED_MODES};
-static int8_t selected_count = sizeof selected / sizeof *selected;
+static int8_t selected_count = ARRAY_SIZE(selected);
static int8_t selected_index;
#endif