[pulseaudio-discuss] [PATCH 01/21] device-port: Assert that ports have a description

David Henningsson david.henningsson at canonical.com
Wed Jun 19 10:38:51 PDT 2013


On 06/19/2013 05:39 PM, Tanu Kaskinen wrote:
> 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.
> ---
>   src/pulsecore/device-port.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/src/pulsecore/device-port.c b/src/pulsecore/device-port.c
> index 9660702..c5d49f3 100644
> --- a/src/pulsecore/device-port.c
> +++ b/src/pulsecore/device-port.c
> @@ -112,6 +112,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));
>

I think I've okayed this on IRC the other week, so acked.


-- 
David Henningsson, Canonical Ltd.
https://launchpad.net/~diwic


More information about the pulseaudio-discuss mailing list