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/solaris.c | |
parent | bb121e68a618d1881a6e35c47938ce0650d07afb (diff) |
Remove unnecessary vars and rework device name checks
Diffstat (limited to 'Alc/solaris.c')
-rw-r--r-- | Alc/solaris.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Alc/solaris.c b/Alc/solaris.c index e6421c2d..b5659608 100644 --- a/Alc/solaris.c +++ b/Alc/solaris.c @@ -92,7 +92,6 @@ static ALuint SolarisProc(ALvoid *ptr) static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *deviceName) { - const char *devName = solaris_device; audio_info_t info; ALuint frameSize; char driver[64]; @@ -101,12 +100,10 @@ static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *device strncpy(driver, GetConfigValue("solaris", "device", "/dev/audio"), sizeof(driver)-1); driver[sizeof(driver)-1] = 0; - if(deviceName) - { - if(strcmp(deviceName, solaris_device)) - return ALC_FALSE; - devName = solaris_device; - } + if(!deviceName) + deviceName = solaris_device; + else if(strcmp(deviceName, solaris_device) != 0) + return ALC_FALSE; data = (solaris_data*)calloc(1, sizeof(solaris_data)); data->killNow = 0; @@ -193,7 +190,7 @@ static ALCboolean solaris_open_playback(ALCdevice *device, const ALCchar *device return ALC_FALSE; } - device->szDeviceName = strdup(devName); + device->szDeviceName = strdup(deviceName); return ALC_TRUE; } |