From f6c719d7ec71cc7771c46d3daa390924a3871ba3 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Mon, 14 Nov 2022 11:32:34 -0500 Subject: replace strlcpy with strmemccpy replace applicable calls to strlcpy with calls to strmemccpy which null terminates on truncation in theory the strmemccpy calls should be slightly faster since they don't traverse the rest of the source string on truncation but I seriously doubt there is too much of that going on in the code base Change-Id: Ia0251514e36a6242bbf3f03c5e0df123aba60ed2 --- apps/recorder/keyboard.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/recorder/keyboard.c') diff --git a/apps/recorder/keyboard.c b/apps/recorder/keyboard.c index 45cccdcf8b..f64061d303 100644 --- a/apps/recorder/keyboard.c +++ b/apps/recorder/keyboard.c @@ -1063,7 +1063,7 @@ static void kbd_draw_edit_line(struct keyboard_parameters *pm, while (*utf8 && i < pm->max_chars_text) { j = utf8seek(utf8, 1); - strlcpy(outline, utf8, j+1); + strmemccpy(outline, utf8, j+1); sc->getstringsize(outline, &w, NULL); sc->putsxy(text_margin + i*pm->text_w + (pm->text_w-w)/2, y, outline); -- cgit v1.2.3