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 /firmware/export/pathfuncs.h | |
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 'firmware/export/pathfuncs.h')
-rw-r--r-- | firmware/export/pathfuncs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/firmware/export/pathfuncs.h b/firmware/export/pathfuncs.h index 1b18f22d06..022a631654 100644 --- a/firmware/export/pathfuncs.h +++ b/firmware/export/pathfuncs.h | |||
@@ -95,7 +95,7 @@ void path_remove_dot_segments(char *dstpath, const char *path); | |||
95 | #define PA_SEP_HARD NULL /* separate even if base is empty */ | 95 | #define PA_SEP_HARD NULL /* separate even if base is empty */ |
96 | #define PA_SEP_SOFT "" /* separate only if base is nonempty */ | 96 | #define PA_SEP_SOFT "" /* separate only if base is nonempty */ |
97 | size_t path_append_ex(char *buf, const char *basepath, size_t basepath_max, | 97 | size_t path_append_ex(char *buf, const char *basepath, size_t basepath_max, |
98 | const char *component, size_t bufsize); | 98 | const char *component, size_t component_max, size_t bufsize); |
99 | size_t path_append(char *buffer, const char *basepath, const char *component, | 99 | size_t path_append(char *buffer, const char *basepath, const char *component, |
100 | size_t bufsize); | 100 | size_t bufsize); |
101 | ssize_t parse_path_component(const char **pathp, const char **namep); | 101 | ssize_t parse_path_component(const char **pathp, const char **namep); |