summaryrefslogtreecommitdiffstats
path: root/OpenAL32
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2010-03-16 20:29:01 -0700
committerChris Robinson <[email protected]>2010-03-16 20:29:01 -0700
commit65e16cc8bba1447397483a09a9ff18c0ec1b9443 (patch)
treeae6fe2ca60873e44d9f874fd8b40b72a0a252d0f /OpenAL32
parent2687155200140863232170c2c00202f27482c814 (diff)
Remove unneeded checks
Diffstat (limited to 'OpenAL32')
-rw-r--r--OpenAL32/alEffect.c24
-rw-r--r--OpenAL32/alFilter.c22
2 files changed, 25 insertions, 21 deletions
diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c
index f4a60e2b..7241de2c 100644
--- a/OpenAL32/alEffect.c
+++ b/OpenAL32/alEffect.c
@@ -100,7 +100,10 @@ ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects)
// Check that all effects are valid
for (i = 0; i < n; i++)
{
- if(effects[i] && !VerifyEffect(device->EffectList, effects[i]))
+ if(!effects[i])
+ continue;
+
+ if(!VerifyEffect(device->EffectList, effects[i]))
{
alSetError(Context, AL_INVALID_NAME);
break;
@@ -113,8 +116,7 @@ ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, ALuint *effects)
for (i = 0; i < n; i++)
{
// Recheck that the effect is valid, because there could be duplicated names
- if(effects[i] &&
- (ALEffect=VerifyEffect(device->EffectList, effects[i])) != NULL)
+ if((ALEffect=VerifyEffect(device->EffectList, effects[i])) != NULL)
{
ALeffect **list;
@@ -168,7 +170,7 @@ ALvoid AL_APIENTRY alEffecti(ALuint effect, ALenum param, ALint iValue)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(param == AL_EFFECT_TYPE)
{
@@ -244,7 +246,7 @@ ALvoid AL_APIENTRY alEffectiv(ALuint effect, ALenum param, ALint *piValues)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(param == AL_EFFECT_TYPE)
{
@@ -304,7 +306,7 @@ ALvoid AL_APIENTRY alEffectf(ALuint effect, ALenum param, ALfloat flValue)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(ALEffect->type == AL_EFFECT_EAXREVERB)
{
@@ -642,7 +644,7 @@ ALvoid AL_APIENTRY alEffectfv(ALuint effect, ALenum param, ALfloat *pflValues)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(ALEffect->type == AL_EFFECT_EAXREVERB)
{
@@ -757,7 +759,7 @@ ALvoid AL_APIENTRY alGetEffecti(ALuint effect, ALenum param, ALint *piValue)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(param == AL_EFFECT_TYPE)
{
@@ -817,7 +819,7 @@ ALvoid AL_APIENTRY alGetEffectiv(ALuint effect, ALenum param, ALint *piValues)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(param == AL_EFFECT_TYPE)
{
@@ -877,7 +879,7 @@ ALvoid AL_APIENTRY alGetEffectf(ALuint effect, ALenum param, ALfloat *pflValue)
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(ALEffect->type == AL_EFFECT_EAXREVERB)
{
@@ -1073,7 +1075,7 @@ ALvoid AL_APIENTRY alGetEffectfv(ALuint effect, ALenum param, ALfloat *pflValues
if(!Context) return;
Device = Context->Device;
- if(effect && (ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
+ if((ALEffect=VerifyEffect(Device->EffectList, effect)) != NULL)
{
if(ALEffect->type == AL_EFFECT_EAXREVERB)
{
diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c
index 75385418..52030246 100644
--- a/OpenAL32/alFilter.c
+++ b/OpenAL32/alFilter.c
@@ -96,6 +96,9 @@ ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters)
// Check that all filters are valid
for (i = 0; i < n; i++)
{
+ if(!filters[i])
+ continue;
+
if(!VerifyFilter(device->FilterList, filters[i]))
{
alSetError(Context, AL_INVALID_NAME);
@@ -109,8 +112,7 @@ ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, ALuint *filters)
for (i = 0; i < n; i++)
{
// Recheck that the filter is valid, because there could be duplicated names
- if(filters[i] &&
- (ALFilter=VerifyFilter(device->FilterList, filters[i])) != NULL)
+ if((ALFilter=VerifyFilter(device->FilterList, filters[i])) != NULL)
{
ALfilter **list;
@@ -164,7 +166,7 @@ ALvoid AL_APIENTRY alFilteri(ALuint filter, ALenum param, ALint iValue)
if(!Context) return;
Device = Context->Device;
- if(filter && (ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
+ if((ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
{
switch(param)
{
@@ -196,7 +198,7 @@ ALvoid AL_APIENTRY alFilteriv(ALuint filter, ALenum param, ALint *piValues)
if(!Context) return;
Device = Context->Device;
- if(filter && VerifyFilter(Device->FilterList, filter) != NULL)
+ if(VerifyFilter(Device->FilterList, filter) != NULL)
{
switch(param)
{
@@ -225,7 +227,7 @@ ALvoid AL_APIENTRY alFilterf(ALuint filter, ALenum param, ALfloat flValue)
if(!Context) return;
Device = Context->Device;
- if(filter && (ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
+ if((ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
{
switch(ALFilter->type)
{
@@ -272,7 +274,7 @@ ALvoid AL_APIENTRY alFilterfv(ALuint filter, ALenum param, ALfloat *pflValues)
if(!Context) return;
Device = Context->Device;
- if(filter && VerifyFilter(Device->FilterList, filter) != NULL)
+ if(VerifyFilter(Device->FilterList, filter) != NULL)
{
switch(param)
{
@@ -297,7 +299,7 @@ ALvoid AL_APIENTRY alGetFilteri(ALuint filter, ALenum param, ALint *piValue)
if(!Context) return;
Device = Context->Device;
- if(filter && (ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
+ if((ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
{
switch(param)
{
@@ -325,7 +327,7 @@ ALvoid AL_APIENTRY alGetFilteriv(ALuint filter, ALenum param, ALint *piValues)
if(!Context) return;
Device = Context->Device;
- if(filter && VerifyFilter(Device->FilterList, filter) != NULL)
+ if(VerifyFilter(Device->FilterList, filter) != NULL)
{
switch(param)
{
@@ -354,7 +356,7 @@ ALvoid AL_APIENTRY alGetFilterf(ALuint filter, ALenum param, ALfloat *pflValue)
if(!Context) return;
Device = Context->Device;
- if(filter && (ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
+ if((ALFilter=VerifyFilter(Device->FilterList, filter)) != NULL)
{
switch(ALFilter->type)
{
@@ -395,7 +397,7 @@ ALvoid AL_APIENTRY alGetFilterfv(ALuint filter, ALenum param, ALfloat *pflValues
if(!Context) return;
Device = Context->Device;
- if(filter && VerifyFilter(Device->FilterList, filter) != NULL)
+ if(VerifyFilter(Device->FilterList, filter) != NULL)
{
switch(param)
{