ao_alsa: remove warning by simplifying error handling case

Avoid a gcc warning about potentially uninitialized variable 'err'
(there was no actual problem with the code).
This commit is contained in:
Clément Bœsch 2011-03-07 21:49:26 +01:00 committed by Uoti Urpala
parent a2d28010cc
commit b17a1cf70c
1 changed files with 4 additions and 4 deletions

View File

@ -310,11 +310,11 @@ static int try_open_device(const char *device, int open_mode, int try_ac3)
err = snd_pcm_open(&alsa_handler, ac3_device, SND_PCM_STREAM_PLAYBACK,
open_mode);
free(ac3_device);
if (!err)
return 0;
}
if (!try_ac3 || err < 0)
err = snd_pcm_open(&alsa_handler, device, SND_PCM_STREAM_PLAYBACK,
return snd_pcm_open(&alsa_handler, device, SND_PCM_STREAM_PLAYBACK,
open_mode);
return err;
}
/*