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/root_menu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/root_menu.c') diff --git a/apps/root_menu.c b/apps/root_menu.c index 227ed75ee3..ae3d1b39b0 100644 --- a/apps/root_menu.c +++ b/apps/root_menu.c @@ -107,7 +107,7 @@ static void rootmenu_track_changed_callback(unsigned short id, void* param) { (void)id; struct mp3entry *id3 = ((struct track_event *)param)->id3; - strlcpy(current_track_path, id3->path, MAX_PATH); + strmemccpy(current_track_path, id3->path, MAX_PATH); } static int browser(void* param) { -- cgit v1.2.3