summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprecondition <57645186+precondition@users.noreply.github.com>2022-10-05 19:42:05 +0200
committerGitHub <noreply@github.com>2022-10-05 10:42:05 -0700
commit49030e3e5bdd412f44a886be6349ebfd2c05bbf2 (patch)
tree6fecd8dee6bb2f4bf002226cbfdbc9ecf99a1254
parent7a84a7458caa021d9eb626cdad1e8861ee3375ca (diff)
Use get_u16_str instead of snprintf in autoshift_timer_report (#18606)
-rw-r--r--quantum/process_keycode/process_auto_shift.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/quantum/process_keycode/process_auto_shift.c b/quantum/process_keycode/process_auto_shift.c
index 3ff188ba7e..644ad2cbaf 100644
--- a/quantum/process_keycode/process_auto_shift.c
+++ b/quantum/process_keycode/process_auto_shift.c
@@ -17,7 +17,6 @@
17#ifdef AUTO_SHIFT_ENABLE 17#ifdef AUTO_SHIFT_ENABLE
18 18
19# include <stdbool.h> 19# include <stdbool.h>
20# include <stdio.h>
21# include "process_auto_shift.h" 20# include "process_auto_shift.h"
22 21
23# ifndef AUTO_SHIFT_DISABLED_AT_STARTUP 22# ifndef AUTO_SHIFT_DISABLED_AT_STARTUP
@@ -331,11 +330,12 @@ void autoshift_disable(void) {
331# ifndef AUTO_SHIFT_NO_SETUP 330# ifndef AUTO_SHIFT_NO_SETUP
332void autoshift_timer_report(void) { 331void autoshift_timer_report(void) {
333# ifdef SEND_STRING_ENABLE 332# ifdef SEND_STRING_ENABLE
334 char display[8]; 333 const char *autoshift_timeout_str = get_u16_str(autoshift_timeout, ' ');
335 334 // Skip padding spaces
336 snprintf(display, 8, "\n%d\n", autoshift_timeout); 335 while (*autoshift_timeout_str == ' ') {
337 336 autoshift_timeout_str++;
338 send_string((const char *)display); 337 }
338 send_string(autoshift_timeout_str);
339# endif 339# endif
340} 340}
341# endif 341# endif