diff options
author | Chris Robinson <[email protected]> | 2009-08-27 18:55:18 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2009-08-27 18:55:18 -0700 |
commit | 832dc8a5857ff492502f23f9604d1b3e27718e24 (patch) | |
tree | 67d528eb5933372ce10b6c7e11df7b5fe48839dc /Alc/wave.c | |
parent | bb121e68a618d1881a6e35c47938ce0650d07afb (diff) |
Remove unnecessary vars and rework device name checks
Diffstat (limited to 'Alc/wave.c')
-rw-r--r-- | Alc/wave.c | 13 |
1 files changed, 5 insertions, 8 deletions
@@ -108,7 +108,6 @@ static ALuint WaveProc(ALvoid *ptr) static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceName) { - const char *devName = waveDevice; wave_data *data; const char *fname; @@ -116,12 +115,10 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam if(!fname[0]) return ALC_FALSE; - if(deviceName) - { - if(strcmp(deviceName, waveDevice) != 0) - return ALC_FALSE; - devName = waveDevice; - } + if(!deviceName) + deviceName = waveDevice; + else if(strcmp(deviceName, waveDevice) != 0) + return ALC_FALSE; data = (wave_data*)calloc(1, sizeof(wave_data)); @@ -133,7 +130,7 @@ static ALCboolean wave_open_playback(ALCdevice *device, const ALCchar *deviceNam return ALC_FALSE; } - device->szDeviceName = strdup(devName); + device->szDeviceName = strdup(deviceName); device->ExtraData = data; return ALC_TRUE; } |