mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
device-port: Assert that ports have a description
It's easier to work with the port description if it can be assumed that it's always non-NULL. I have checked that the current code base always ensures a non-NULL description.
This commit is contained in:
parent
8127f8f9c5
commit
a9c3503ee9
1 changed files with 1 additions and 0 deletions
|
|
@ -110,6 +110,7 @@ pa_device_port *pa_device_port_new(pa_core *c, pa_device_port_new_data *data, si
|
|||
|
||||
pa_assert(data);
|
||||
pa_assert(data->name);
|
||||
pa_assert(data->description);
|
||||
pa_assert(data->direction == PA_DIRECTION_OUTPUT || data->direction == PA_DIRECTION_INPUT);
|
||||
|
||||
p = PA_DEVICE_PORT(pa_object_new_internal(PA_ALIGN(sizeof(pa_device_port)) + extra, pa_device_port_type_id, pa_device_port_check_type));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue