]> code.delx.au - pulseaudio/commitdiff
Use pa_assert_se() when the containing code has side effects.
authorColin Guthrie <cguthrie@mandriva.org>
Mon, 2 Mar 2009 13:11:29 +0000 (13:11 +0000)
committerColin Guthrie <cguthrie@mandriva.org>
Mon, 2 Mar 2009 13:11:29 +0000 (13:11 +0000)
As reported by rantala. Closes #502 and #503

src/modules/module-combine.c
src/modules/module-jack-source.c

index 6ed4f1413e2412efe05a0db7477afb8d4343f001..6e4e927728cc544ced7dcaa35925c53107b0bdaf 100644 (file)
@@ -487,7 +487,7 @@ static void sink_input_kill_cb(pa_sink_input *i) {
     struct output *o;
 
     pa_sink_input_assert_ref(i);
-    pa_assert(o = i->userdata);
+    pa_assert_se(o = i->userdata);
 
     pa_module_unload_request(o->userdata->module, TRUE);
     output_free(o);
index 38b63751a6e84c67d12c1e4c71829228eed56f38..373d56e2b454b4859882fcdd8959bfe860f9e026 100644 (file)
@@ -163,7 +163,7 @@ static int jack_process(jack_nframes_t nframes, void *arg) {
     pa_assert(u);
 
     for (c = 0; c < u->channels; c++)
-        pa_assert(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
+        pa_assert_se(buffer[c] = jack_port_get_buffer(u->port[c], nframes));
 
     /* We interleave the data and pass it on to the other RT thread */