mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-12-28 08:57:11 -05:00
core-util: replace remaining fixed size destination string functions by _malloc() versions
This helps portability to GNU/Hurd. Patch originally from Samuel Thibault but modified. Closes ticket #546
This commit is contained in:
parent
c6ea9fecc9
commit
49fd8ee72e
7 changed files with 119 additions and 38 deletions
|
|
@ -494,13 +494,14 @@ int pa_scache_add_directory_lazy(pa_core *c, const char *pathname) {
|
|||
struct dirent *e;
|
||||
|
||||
while ((e = readdir(dir))) {
|
||||
char p[PATH_MAX];
|
||||
char *p;
|
||||
|
||||
if (e->d_name[0] == '.')
|
||||
continue;
|
||||
|
||||
pa_snprintf(p, sizeof(p), "%s/%s", pathname, e->d_name);
|
||||
p = pa_sprintf_malloc("%s" PA_PATH_SEP "%s", pathname, e->d_name);
|
||||
add_file(c, p);
|
||||
pa_xfree(p);
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue