From 2aa8e17c881ba092f38e50f4ad0a570a5a998a6c Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 16 Jun 2015 22:16:36 +0200 Subject: [PATCH] Cleanup. --- src/context.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/context.c b/src/context.c index 215437bc..d32bb5a9 100644 --- a/src/context.c +++ b/src/context.c @@ -492,16 +492,13 @@ GLboolean _glfwIsValidContext(const _GLFWctxconfig* ctxconfig) int _glfwStringInExtensionString(const char* string, const GLubyte* extensions) { - const GLubyte* start; - GLubyte* where; - GLubyte* terminator; + const GLubyte* start = extensions; - // It takes a bit of care to be fool-proof about parsing the - // OpenGL extensions string. Don't be fooled by sub-strings, - // etc. - start = extensions; for (;;) { + GLubyte* where; + GLubyte* terminator; + where = (GLubyte*) strstr((const char*) start, string); if (!where) return GL_FALSE;