summaryrefslogtreecommitdiffstats
path: root/src/pulse/simple.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2009-08-05 01:04:08 +0200
committerLennart Poettering <lennart@poettering.net>2009-08-05 01:04:08 +0200
commitb553e7283d3ec38080d6544672b920b9811c1a89 (patch)
tree0fe813bc4907f00a7eba12db473a3b831e41fa68 /src/pulse/simple.c
parenta4bc41a7a505c3acfe329d1a64cd82e7538a1e8f (diff)
simple: use pa_xnew0 instead of manual reset to 0
Diffstat (limited to 'src/pulse/simple.c')
-rw-r--r--src/pulse/simple.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index bd11cb37..7fd7cce7 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -157,12 +157,8 @@ pa_simple* pa_simple_new(
CHECK_VALIDITY_RETURN_ANY(rerror, ss && pa_sample_spec_valid(ss), PA_ERR_INVALID, NULL);
CHECK_VALIDITY_RETURN_ANY(rerror, !map || (pa_channel_map_valid(map) && map->channels == ss->channels), PA_ERR_INVALID, NULL)
- p = pa_xnew(pa_simple, 1);
- p->context = NULL;
- p->stream = NULL;
+ p = pa_xnew0(pa_simple, 1);
p->direction = dir;
- p->read_data = NULL;
- p->read_index = p->read_length = 0;
if (!(p->mainloop = pa_threaded_mainloop_new()))
goto fail;