Limit variable scope.

Issue found by cppcheck.
This commit is contained in:
Mark de Wever 2011-09-04 16:52:15 +00:00
parent 4ae425d811
commit 26363c3155

View file

@ -335,7 +335,7 @@ bool init_sound() {
}
void close_sound() {
int numtimesopened, frequency, channels;
int frequency, channels;
Uint16 format;
if(mix_ok) {
@ -346,7 +346,7 @@ void close_sound() {
stop_music();
mix_ok = false;
numtimesopened = Mix_QuerySpec(&frequency, &format, &channels);
int numtimesopened = Mix_QuerySpec(&frequency, &format, &channels);
if(numtimesopened == 0) {
ERR_AUDIO << "Error closing audio device: " << Mix_GetError() << "\n";
}