alsa-mixer: Add a couple of assertions
authorTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Thu, 27 Jun 2013 15:47:12 +0000 (18:47 +0300)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Thu, 27 Jun 2013 16:18:36 +0000 (19:18 +0300)
I checked the code to ensure that the assertions hold currently.

src/modules/alsa/alsa-mixer.c

index f4410d7..b2f6c2e 100644 (file)
@@ -4530,10 +4530,9 @@ void pa_alsa_path_set_add_ports(
     pa_alsa_path *path;
     void *state;
 
+    pa_assert(ps);
     pa_assert(ports);
-
-    if (!ps)
-        return;
+    pa_assert(core);
 
     PA_HASHMAP_FOREACH(path, ps->paths, state) {
         if (!path->settings || !path->settings->next) {