]> code.delx.au - pulseaudio/commitdiff
device-port: Assert that ports have a description
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Wed, 19 Jun 2013 15:39:58 +0000 (18:39 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Tue, 25 Jun 2013 16:15:11 +0000 (19:15 +0300)
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

index 57d0293821949ab837ef3ff556a39c6308773b77..8bff5b601f77725cff6aeffb140073354d81d64e 100644 (file)
@@ -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));