summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVinson Lee <[email protected]>2011-10-25 20:30:27 -0700
committerVinson Lee <[email protected]>2011-10-25 20:31:14 -0700
commit20a20c781ac2143e92807fa8dfab086a5b7c1d53 (patch)
treea1fea69b0f6de0d7461d52ceb9e301c6af530172 /src
parenta936b206a01301d8c76fc1ddcb4d4550f8595b31 (diff)
ralloc: Move declaration before code.
Fixes build error with MSVC.
Diffstat (limited to 'src')
-rw-r--r--src/glsl/ralloc.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/glsl/ralloc.c b/src/glsl/ralloc.c
index 2967598aecb..f5f3934ac2c 100644
--- a/src/glsl/ralloc.c
+++ b/src/glsl/ralloc.c
@@ -439,8 +439,9 @@ ralloc_asprintf_append(char **str, const char *fmt, ...)
bool
ralloc_vasprintf_append(char **str, const char *fmt, va_list args)
{
+ size_t existing_length;
assert(str != NULL);
- size_t existing_length = *str ? strlen(*str) : 0;
+ existing_length = *str ? strlen(*str) : 0;
return ralloc_vasprintf_rewrite_tail(str, existing_length, fmt, args);
}