From 5742bc42d061b7f60c6ed3dbd71c64f12c77f91f Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:15 +0200 Subject: jack: don't set audioOutput->data=NULL There is only one caller of freeJackData() left: jack_finishDriver(). This function is called by the mpd core, and is called exactly once for every successful jack_initDriver(). We do not need to clear audioOutput->data, since this variable is invalidated anyway. --- src/audioOutputs/audioOutput_jack.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c index 9fc52055f..5e0b1b599 100644 --- a/src/audioOutputs/audioOutput_jack.c +++ b/src/audioOutputs/audioOutput_jack.c @@ -87,11 +87,11 @@ static void freeJackClient(JackData *jd) static void freeJackData(AudioOutput *audioOutput) { JackData *jd = audioOutput->data; - if (jd) { - freeJackClient(jd); - free(jd); - audioOutput->data = NULL; - } + + assert(jd != NULL); + + freeJackClient(jd); + free(jd); } static void jack_finishDriver(AudioOutput *audioOutput) -- cgit v1.2.3