From 8e0b55596ee1b33457b14f757eb50a69caeab60e Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Tue, 26 Aug 2008 08:27:15 +0200 Subject: jack: eliminate superfluous freeJackData() calls connect_jack() invokes freeJackData() in every error handler, although its caller also invokes this function after a failure. We can save a lot of lines in connect_jack() by removing these redundant freeJackData() invocations. --- src/audioOutputs/audioOutput_jack.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/audioOutputs/audioOutput_jack.c b/src/audioOutputs/audioOutput_jack.c index c8aa4dcb6..a62c0a0e9 100644 --- a/src/audioOutputs/audioOutput_jack.c +++ b/src/audioOutputs/audioOutput_jack.c @@ -257,7 +257,6 @@ static int connect_jack(AudioOutput *audioOutput) if ( (jd->client = jack_client_new(name)) == NULL ) { ERROR("jack server not running?\n"); - freeJackData(audioOutput); return -1; } @@ -269,7 +268,6 @@ static int connect_jack(AudioOutput *audioOutput) if ( jack_activate(jd->client) ) { ERROR("cannot activate client\n"); - freeJackData(audioOutput); return -1; } @@ -278,7 +276,6 @@ static int connect_jack(AudioOutput *audioOutput) JackPortIsOutput, 0); if ( !jd->ports[0] ) { ERROR("Cannot register left output port.\n"); - freeJackData(audioOutput); return -1; } @@ -287,7 +284,6 @@ static int connect_jack(AudioOutput *audioOutput) JackPortIsOutput, 0); if ( !jd->ports[1] ) { ERROR("Cannot register right output port.\n"); - freeJackData(audioOutput); return -1; } @@ -315,7 +311,6 @@ static int connect_jack(AudioOutput *audioOutput) output_ports[0])) != 0 ) { ERROR("%s is not a valid Jack Client / Port\n", output_ports[0]); - freeJackData(audioOutput); free(port_name); return -1; } @@ -324,7 +319,6 @@ static int connect_jack(AudioOutput *audioOutput) output_ports[1])) != 0 ) { ERROR("%s is not a valid Jack Client / Port\n", output_ports[1]); - freeJackData(audioOutput); free(port_name); return -1; } -- cgit v1.2.3