diff options
-rw-r--r-- | src/ao_pulse.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/ao_pulse.c b/src/ao_pulse.c index c2a1f54..bc85208 100644 --- a/src/ao_pulse.c +++ b/src/ao_pulse.c @@ -72,7 +72,7 @@ static void disable_sigpipe(void) { int ao_plugin_test(void) { char p[PATH_MAX], t[256], t2[256]; - const char *fn = NULL; + const char *fn; struct pa_simple *s; static const struct pa_sample_spec ss = { .format = PA_SAMPLE_S16LE, @@ -85,8 +85,7 @@ int ao_plugin_test(void) { if (getenv("PULSE_SERVER") || getenv("PULSE_SINK")) return 1; - if (pa_get_binary_name(p, sizeof(p))) { - fn = pa_path_get_filename(p); + if ((fn = pa_get_binary_name(p, sizeof(p)))) { snprintf(t, sizeof(t), "libao[%s]", fn); snprintf(t2, sizeof(t2), "libao[%s] test", fn); } |