diff options
Diffstat (limited to 'OpenAL32')
-rw-r--r-- | OpenAL32/alAuxEffectSlot.c | 4 | ||||
-rw-r--r-- | OpenAL32/alBuffer.c | 2 | ||||
-rw-r--r-- | OpenAL32/alEffect.c | 4 | ||||
-rw-r--r-- | OpenAL32/alFilter.c | 4 | ||||
-rw-r--r-- | OpenAL32/alSource.c | 24 |
5 files changed, 19 insertions, 19 deletions
diff --git a/OpenAL32/alAuxEffectSlot.c b/OpenAL32/alAuxEffectSlot.c index 8141e0f6..e1d84bb9 100644 --- a/OpenAL32/alAuxEffectSlot.c +++ b/OpenAL32/alAuxEffectSlot.c @@ -116,7 +116,7 @@ AL_API ALvoid AL_APIENTRY alGenAuxiliaryEffectSlots(ALsizei n, ALuint *effectslo context = GetContextRef(); if(!context) return; - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Generating %d effect slots", n); if(n == 0) goto done; @@ -179,7 +179,7 @@ AL_API ALvoid AL_APIENTRY alDeleteAuxiliaryEffectSlots(ALsizei n, const ALuint * if(!context) return; LockEffectSlotList(context); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Deleting %d effect slots", n); if(n == 0) goto done; diff --git a/OpenAL32/alBuffer.c b/OpenAL32/alBuffer.c index ed712434..0b8c27f5 100644 --- a/OpenAL32/alBuffer.c +++ b/OpenAL32/alBuffer.c @@ -77,7 +77,7 @@ AL_API ALvoid AL_APIENTRY alGenBuffers(ALsizei n, ALuint *buffers) context = GetContextRef(); if(!context) return; - if(!(n >= 0)) + if(n < 0) alSetError(context, AL_INVALID_VALUE, "Generating %d buffers", n); else for(cur = 0;cur < n;cur++) { diff --git a/OpenAL32/alEffect.c b/OpenAL32/alEffect.c index c2a78a0c..05a6c0a3 100644 --- a/OpenAL32/alEffect.c +++ b/OpenAL32/alEffect.c @@ -81,7 +81,7 @@ AL_API ALvoid AL_APIENTRY alGenEffects(ALsizei n, ALuint *effects) context = GetContextRef(); if(!context) return; - if(!(n >= 0)) + if(n < 0) alSetError(context, AL_INVALID_VALUE, "Generating %d effects", n); else for(cur = 0;cur < n;cur++) { @@ -109,7 +109,7 @@ AL_API ALvoid AL_APIENTRY alDeleteEffects(ALsizei n, const ALuint *effects) device = context->Device; LockEffectList(device); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Deleting %d effects", n); for(i = 0;i < n;i++) { diff --git a/OpenAL32/alFilter.c b/OpenAL32/alFilter.c index e57653e0..01da4008 100644 --- a/OpenAL32/alFilter.c +++ b/OpenAL32/alFilter.c @@ -61,7 +61,7 @@ AL_API ALvoid AL_APIENTRY alGenFilters(ALsizei n, ALuint *filters) context = GetContextRef(); if(!context) return; - if(!(n >= 0)) + if(n < 0) alSetError(context, AL_INVALID_VALUE, "Generating %d filters", n); else for(cur = 0;cur < n;cur++) { @@ -90,7 +90,7 @@ AL_API ALvoid AL_APIENTRY alDeleteFilters(ALsizei n, const ALuint *filters) device = context->Device; LockFilterList(device); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Deleting %d filters", n); for(i = 0;i < n;i++) { diff --git a/OpenAL32/alSource.c b/OpenAL32/alSource.c index d7c68e4e..2e3a0e2a 100644 --- a/OpenAL32/alSource.c +++ b/OpenAL32/alSource.c @@ -988,7 +988,7 @@ static ALboolean SetSourceiv(ALsource *Source, ALCcontext *Context, SourceProp p SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid effect ID %u", values[0]); } - if(!((ALuint)values[1] < (ALuint)device->NumAuxSends)) + if((ALuint)values[1] >= (ALuint)device->NumAuxSends) { UnlockEffectSlotList(Context); SETERR_RETURN(Context, AL_INVALID_VALUE, AL_FALSE, "Invalid send %u", values[1]); @@ -1683,7 +1683,7 @@ AL_API ALvoid AL_APIENTRY alGenSources(ALsizei n, ALuint *sources) context = GetContextRef(); if(!context) return; - if(!(n >= 0)) + if(n < 0) alSetError(context, AL_INVALID_VALUE, "Generating %d sources", n); else for(cur = 0;cur < n;cur++) { @@ -1710,7 +1710,7 @@ AL_API ALvoid AL_APIENTRY alDeleteSources(ALsizei n, const ALuint *sources) if(!context) return; LockSourceList(context); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Deleting %d sources", n); /* Check that all Sources are valid */ @@ -1761,7 +1761,7 @@ AL_API ALvoid AL_APIENTRY alSourcef(ALuint source, ALenum param, ALfloat value) LockSourceList(Context); if((Source=LookupSource(Context, source)) == NULL) alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); - else if(!(FloatValsByProp(param) == 1)) + else if(FloatValsByProp(param) != 1) alSetError(Context, AL_INVALID_ENUM, "Invalid float property 0x%04x", param); else SetSourcefv(Source, Context, param, &value); @@ -1783,7 +1783,7 @@ AL_API ALvoid AL_APIENTRY alSource3f(ALuint source, ALenum param, ALfloat value1 LockSourceList(Context); if((Source=LookupSource(Context, source)) == NULL) alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); - else if(!(FloatValsByProp(param) == 3)) + else if(FloatValsByProp(param) != 3) alSetError(Context, AL_INVALID_ENUM, "Invalid 3-float property 0x%04x", param); else { @@ -1810,7 +1810,7 @@ AL_API ALvoid AL_APIENTRY alSourcefv(ALuint source, ALenum param, const ALfloat alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); else if(!values) alSetError(Context, AL_INVALID_VALUE, "NULL pointer"); - else if(!(FloatValsByProp(param) > 0)) + else if(FloatValsByProp(param) <= 0) alSetError(Context, AL_INVALID_ENUM, "Invalid float-vector property 0x%04x", param); else SetSourcefv(Source, Context, param, values); @@ -1833,7 +1833,7 @@ AL_API ALvoid AL_APIENTRY alSourcedSOFT(ALuint source, ALenum param, ALdouble va LockSourceList(Context); if((Source=LookupSource(Context, source)) == NULL) alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); - else if(!(DoubleValsByProp(param) == 1)) + else if(DoubleValsByProp(param) != 1) alSetError(Context, AL_INVALID_ENUM, "Invalid double property 0x%04x", param); else { @@ -1858,7 +1858,7 @@ AL_API ALvoid AL_APIENTRY alSource3dSOFT(ALuint source, ALenum param, ALdouble v LockSourceList(Context); if((Source=LookupSource(Context, source)) == NULL) alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); - else if(!(DoubleValsByProp(param) == 3)) + else if(DoubleValsByProp(param) != 3) alSetError(Context, AL_INVALID_ENUM, "Invalid 3-double property 0x%04x", param); else { @@ -1916,7 +1916,7 @@ AL_API ALvoid AL_APIENTRY alSourcei(ALuint source, ALenum param, ALint value) LockSourceList(Context); if((Source=LookupSource(Context, source)) == NULL) alSetError(Context, AL_INVALID_NAME, "Invalid source ID %u", source); - else if(!(IntValsByProp(param) == 1)) + else if(IntValsByProp(param) != 1) alSetError(Context, AL_INVALID_ENUM, "Invalid integer property 0x%04x", param); else SetSourceiv(Source, Context, param, &value); @@ -2568,7 +2568,7 @@ AL_API ALvoid AL_APIENTRY alSourcePausev(ALsizei n, const ALuint *sources) if(!context) return; LockSourceList(context); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Pausing %d sources", n); for(i = 0;i < n;i++) { @@ -2612,7 +2612,7 @@ AL_API ALvoid AL_APIENTRY alSourceStopv(ALsizei n, const ALuint *sources) if(!context) return; LockSourceList(context); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Stopping %d sources", n); for(i = 0;i < n;i++) { @@ -2664,7 +2664,7 @@ AL_API ALvoid AL_APIENTRY alSourceRewindv(ALsizei n, const ALuint *sources) if(!context) return; LockSourceList(context); - if(!(n >= 0)) + if(n < 0) SETERR_GOTO(context, AL_INVALID_VALUE, done, "Rewinding %d sources", n); for(i = 0;i < n;i++) { |