diff options
author | Max Kellermann <max@duempel.org> | 2009-03-26 19:50:23 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-03-26 19:50:23 +0100 |
commit | 6c480d7db43c592d2a174de28a00de5f2c7cf2ba (patch) | |
tree | b403ae7f7199d57d453b6f8c977eead24a14dfc8 /src/mixer/pulse_mixer.c | |
parent | 8cf206f2eeb8a7612be9e898a54e066d9b110e90 (diff) | |
download | mpd-6c480d7db43c592d2a174de28a00de5f2c7cf2ba.tar.gz mpd-6c480d7db43c592d2a174de28a00de5f2c7cf2ba.tar.xz mpd-6c480d7db43c592d2a174de28a00de5f2c7cf2ba.zip |
pulse_mixer: removed superfluous NULL checks in close()
When the MPD core knows that the pulse mixer is open, pm->mainloop and
pm->context must be non-NULL.
Diffstat (limited to 'src/mixer/pulse_mixer.c')
-rw-r--r-- | src/mixer/pulse_mixer.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/src/mixer/pulse_mixer.c b/src/mixer/pulse_mixer.c index b1067ae98..7999699be 100644 --- a/src/mixer/pulse_mixer.c +++ b/src/mixer/pulse_mixer.c @@ -255,19 +255,11 @@ static void pulse_mixer_close(G_GNUC_UNUSED struct mixer *data) { struct pulse_mixer *pm=(struct pulse_mixer *) data; - if (pm->mainloop) - pa_threaded_mainloop_stop(pm->mainloop); - if (pm->context) { - pa_context_disconnect(pm->context); - pa_context_unref(pm->context); - pm->context = NULL; - } - - if (pm->mainloop) { - pa_threaded_mainloop_free(pm->mainloop); - pm->mainloop = NULL; - } + pa_threaded_mainloop_stop(pm->mainloop); + pa_context_disconnect(pm->context); + pa_context_unref(pm->context); + pa_threaded_mainloop_free(pm->mainloop); pm->online = false; } |