diff options
author | Chris Robinson <[email protected]> | 2011-08-19 03:01:02 -0700 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2011-08-19 03:01:57 -0700 |
commit | b40aa8636b6216f1ee49e75c26f5f52c5eb3248f (patch) | |
tree | 3e3bf35ba4d0b82008c6e8e0e10985a03846350b /Alc/ALc.c | |
parent | b3645df56fa96371c1818f950f380935d8095800 (diff) |
Remove a couple unneeded variables
Diffstat (limited to 'Alc/ALc.c')
-rw-r--r-- | Alc/ALc.c | 20 |
1 files changed, 6 insertions, 14 deletions
@@ -1630,7 +1630,6 @@ static ALCvoid FreeContext(ALCcontext *context) // This should probably move to another c file but for now ... ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, ALCuint frequency, ALCenum format, ALCsizei SampleSize) { - ALCboolean DeviceFound = ALC_FALSE; ALCdevice *device = NULL; DO_INITCONFIG(); @@ -1686,18 +1685,15 @@ ALC_API ALCdevice* ALC_APIENTRY alcCaptureOpenDevice(const ALCchar *deviceName, device->next = g_pDeviceList; g_pDeviceList = device; g_ulDeviceCount++; - - DeviceFound = ALC_TRUE; } - UnlockLists(); - - if(!DeviceFound) + else { - alcSetError(NULL, ALC_INVALID_VALUE); DeleteCriticalSection(&device->Mutex); free(device); device = NULL; + alcSetError(NULL, ALC_INVALID_VALUE); } + UnlockLists(); return device; } @@ -2691,7 +2687,6 @@ static void GetFormatFromString(const char *str, enum DevFmtChannels *chans, enu */ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) { - ALboolean bDeviceFound = AL_FALSE; const ALCchar *fmt; ALCdevice *device; @@ -2776,19 +2771,16 @@ ALC_API ALCdevice* ALC_APIENTRY alcOpenDevice(const ALCchar *deviceName) device->next = g_pDeviceList; g_pDeviceList = device; g_ulDeviceCount++; - - bDeviceFound = AL_TRUE; } - UnlockLists(); - - if(!bDeviceFound) + else { // No suitable output device found - alcSetError(NULL, ALC_INVALID_VALUE); DeleteCriticalSection(&device->Mutex); free(device); device = NULL; + alcSetError(NULL, ALC_INVALID_VALUE); } + UnlockLists(); return device; } |