[pulseaudio-discuss] [PATCH 1/2] fdsem: remove superfluous parameter in call to pa_fdsem_new_shm
David Henningsson
david.henningsson at canonical.com
Tue Apr 15 08:25:54 PDT 2014
This parameter was never assigned, so just remove it.
Note that the only current user of this function is shmasyncq.c,
which is unused - we don't even build it. But I fixed it up anyway.
Signed-off-by: David Henningsson <david.henningsson at canonical.com>
---
src/pulsecore/fdsem.c | 3 +--
src/pulsecore/fdsem.h | 2 +-
src/pulsecore/shmasyncq.c | 3 ++-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/pulsecore/fdsem.c b/src/pulsecore/fdsem.c
index ec32461..b153ddd 100644
--- a/src/pulsecore/fdsem.c
+++ b/src/pulsecore/fdsem.c
@@ -100,11 +100,10 @@ pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd) {
return f;
}
-pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd) {
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data) {
pa_fdsem *f = NULL;
pa_assert(data);
- pa_assert(event_fd);
#ifdef HAVE_SYS_EVENTFD_H
diff --git a/src/pulsecore/fdsem.h b/src/pulsecore/fdsem.h
index a434ac3..3f1d9a1 100644
--- a/src/pulsecore/fdsem.h
+++ b/src/pulsecore/fdsem.h
@@ -38,7 +38,7 @@ typedef struct pa_fdsem_data {
pa_fdsem *pa_fdsem_new(void);
pa_fdsem *pa_fdsem_open_shm(pa_fdsem_data *data, int event_fd);
-pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data, int* event_fd);
+pa_fdsem *pa_fdsem_new_shm(pa_fdsem_data *data);
void pa_fdsem_free(pa_fdsem *f);
void pa_fdsem_post(pa_fdsem *f);
diff --git a/src/pulsecore/shmasyncq.c b/src/pulsecore/shmasyncq.c
index e6599a9..8d3c447 100644
--- a/src/pulsecore/shmasyncq.c
+++ b/src/pulsecore/shmasyncq.c
@@ -86,10 +86,11 @@ pa_shmasyncq *pa_shmasyncq_new(unsigned n_elements, size_t element_size, void *d
l->data->n_elements = n_elements;
l->data->element_size = element_size;
- if (!(l->read_fdsem = pa_fdsem_new_shm(&d->read_fdsem_data, &fd[0]))) {
+ if (!(l->read_fdsem = pa_fdsem_new_shm(&d->read_fdsem_data))) {
pa_xfree(l);
return NULL;
}
+ fd[0] = pa_fdsem_get(l->read_fdsem);
if (!(l->write_fdsem = pa_fdsem_new(&d->write_fdsem_data, &fd[1]))) {
pa_fdsem_free(l->read_fdsem);
--
1.9.1
More information about the pulseaudio-discuss
mailing list