summaryrefslogtreecommitdiffstats
path: root/src/utils/padsp.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-01 02:03:22 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-01 02:03:22 +0200
commit49fd8ee72e76cd27a978a843ecc58ad10fe077bc (patch)
tree56568293bea1b42faa267a96836e01ad418cbd18 /src/utils/padsp.c
parentc6ea9fecc9acd70642ae45b01300484f6b900c6b (diff)
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
Diffstat (limited to 'src/utils/padsp.c')
-rw-r--r--src/utils/padsp.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/utils/padsp.c b/src/utils/padsp.c
index dfa5aac2..882522c4 100644
--- a/src/utils/padsp.c
+++ b/src/utils/padsp.c
@@ -53,6 +53,7 @@
#include <pulse/pulseaudio.h>
#include <pulse/gccmacro.h>
#include <pulsecore/llist.h>
+#include <pulsecore/core-util.h>
/* On some systems SIOCINQ isn't defined, but FIONREAD is just an alias */
#if !defined(SIOCINQ) && defined(FIONREAD)
@@ -459,15 +460,16 @@ static void reset_params(fd_info *i) {
}
static const char *client_name(char *buf, size_t n) {
- char p[PATH_MAX];
+ char *p;
const char *e;
if ((e = getenv("PADSP_CLIENT_NAME")))
return e;
- if (pa_get_binary_name(p, sizeof(p)))
+ if ((p = pa_get_binary_name_malloc())) {
snprintf(buf, n, "OSS Emulation[%s]", p);
- else
+ pa_xfree(p);
+ } else
snprintf(buf, n, "OSS");
return buf;