diff options
author | William Wilgus <wilgus.william@gmail.com> | 2023-11-11 00:01:34 -0500 |
---|---|---|
committer | William Wilgus <me.theuser@yahoo.com> | 2023-11-19 12:00:02 -0500 |
commit | dbe20d453d5e93bd0f1188a8851c6cf4fd230b26 (patch) | |
tree | 943a01d0aaf051bb7ad47d390bcb848058cb2404 /apps/playlist.c | |
parent | a7d0ff200066ff4d102ffff9e24d3c2b8ef7fde5 (diff) | |
download | rockbox-dbe20d453d5e93bd0f1188a8851c6cf4fd230b26.tar.gz rockbox-dbe20d453d5e93bd0f1188a8851c6cf4fd230b26.zip |
Extend path_append_ex to truncate compname, remove some strmemdupa
remove some duplicated strings previously allocd off the stack
just removing string duplications that are easily handled with truncation
now available with path_append_ex()
this also has an advantage of less stack used in worst case scenarios
Change-Id: I3a43e33ef8a8c36599e4c6c036a0ccdd8ed0c883
Diffstat (limited to 'apps/playlist.c')
-rw-r--r-- | apps/playlist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/playlist.c b/apps/playlist.c index 67d59d1aac..f4e8ddb104 100644 --- a/apps/playlist.c +++ b/apps/playlist.c | |||
@@ -589,7 +589,7 @@ static ssize_t format_track_path(char *dest, char *src, int buf_length, | |||
589 | dlen = -1u; | 589 | dlen = -1u; |
590 | } | 590 | } |
591 | 591 | ||
592 | len = path_append_ex(dest, dir, dlen, src, buf_length); | 592 | len = path_append_ex(dest, dir, dlen, src, -1u, buf_length); |
593 | if (len >= (size_t)buf_length) | 593 | if (len >= (size_t)buf_length) |
594 | return -1; /* buffer too small */ | 594 | return -1; /* buffer too small */ |
595 | 595 | ||