aboutsummaryrefslogtreecommitdiffstats
path: root/OpenAL32/alExtension.c
diff options
context:
space:
mode:
authorChris Robinson <[email protected]>2013-10-07 12:05:39 -0700
committerChris Robinson <[email protected]>2013-10-07 12:05:39 -0700
commitb3841653c67276f23717b87b47899740ab0028f4 (patch)
treed219009aa448a78baaef9b952e0a53790ec944e9 /OpenAL32/alExtension.c
parent32d3bde261f461807d42d419ddba44b45798436b (diff)
Remove the last of the al_try code
Diffstat (limited to 'OpenAL32/alExtension.c')
-rw-r--r--OpenAL32/alExtension.c44
1 files changed, 21 insertions, 23 deletions
diff --git a/OpenAL32/alExtension.c b/OpenAL32/alExtension.c
index 785f172e..fc23a932 100644
--- a/OpenAL32/alExtension.c
+++ b/OpenAL32/alExtension.c
@@ -55,38 +55,36 @@ const struct EffectList EffectList[] = {
AL_API ALboolean AL_APIENTRY alIsExtensionPresent(const ALchar *extName)
{
ALboolean ret = AL_FALSE;
- ALCcontext *Context;
+ ALCcontext *context;
const char *ptr;
size_t len;
- Context = GetContextRef();
- if(!Context) return AL_FALSE;
+ context = GetContextRef();
+ if(!context) return AL_FALSE;
- al_try
- {
- CHECK_VALUE(Context, extName);
+ if(!(extName))
+ SET_ERROR_AND_GOTO(context, AL_INVALID_VALUE, done);
- len = strlen(extName);
- ptr = Context->ExtensionList;
- while(ptr && *ptr)
+ len = strlen(extName);
+ ptr = context->ExtensionList;
+ while(ptr && *ptr)
+ {
+ if(strncasecmp(ptr, extName, len) == 0 &&
+ (ptr[len] == '\0' || isspace(ptr[len])))
+ {
+ ret = AL_TRUE;
+ break;
+ }
+ if((ptr=strchr(ptr, ' ')) != NULL)
{
- if(strncasecmp(ptr, extName, len) == 0 &&
- (ptr[len] == '\0' || isspace(ptr[len])))
- {
- ret = AL_TRUE;
- break;
- }
- if((ptr=strchr(ptr, ' ')) != NULL)
- {
- do {
- ++ptr;
- } while(isspace(*ptr));
- }
+ do {
+ ++ptr;
+ } while(isspace(*ptr));
}
}
- al_endtry;
- ALCcontext_DecRef(Context);
+done:
+ ALCcontext_DecRef(context);
return ret;
}