mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
simple: use pa_xnew0 instead of manual reset to 0
This commit is contained in:
parent
a4bc41a7a5
commit
b553e7283d
1 changed files with 1 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue