summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorZack Rusin <[email protected]>2011-01-26 21:20:53 -0500
committerZack Rusin <[email protected]>2011-01-26 21:20:53 -0500
commit59dbdbbb7d0ff90dc7561b1bc337bbb918755103 (patch)
treeda8f133c8efe20bed27c8f55531996adf6672ac3 /src/mesa
parent67c67ee80fd00c033561ffc32d0fed671db36302 (diff)
mesa: fix compilation
this isn't c++ please don't mix declerations with code
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/main/extensions.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/mesa/main/extensions.c b/src/mesa/main/extensions.c
index 38227e5b9be..aaef337ac11 100644
--- a/src/mesa/main/extensions.c
+++ b/src/mesa/main/extensions.c
@@ -747,6 +747,11 @@ static char *
get_extension_override( struct gl_context *ctx )
{
const char *env_const= _mesa_getenv("MESA_EXTENSION_OVERRIDE");
+ char *env;
+ char *ext;
+ char *extra_exts;
+ int len;
+
if (env_const == NULL) {
/* Return the empty string rather than NULL. This simplifies the logic
* of client functions. */
@@ -754,13 +759,13 @@ get_extension_override( struct gl_context *ctx )
}
/* extra_exts: List of unrecognized extensions. */
- char *extra_exts = calloc(strlen(env_const), sizeof(char));
+ extra_exts = calloc(strlen(env_const), sizeof(char));
/* Copy env_const because strtok() is destructive. */
- char *env = strdup(env_const);
- char *ext;
+ env = strdup(env_const);
for (ext = strtok(env, " "); ext != NULL; ext = strtok(NULL, " ")) {
int enable;
+ int recognized;
switch (ext[0]) {
case '+':
enable = 1;
@@ -774,7 +779,7 @@ get_extension_override( struct gl_context *ctx )
enable = 1;
break;
}
- int recognized = set_extension(ctx, ext, enable);
+ recognized = set_extension(ctx, ext, enable);
if (!recognized) {
strcat(extra_exts, ext);
strcat(extra_exts, " ");
@@ -782,7 +787,7 @@ get_extension_override( struct gl_context *ctx )
}
/* Remove trailing space. */
- int len = strlen(extra_exts);
+ len = strlen(extra_exts);
if (extra_exts[len - 1] == ' ')
extra_exts[len - 1] = '\0';