From: Vinson Lee Date: Wed, 26 Oct 2011 03:30:27 +0000 (-0700) Subject: ralloc: Move declaration before code. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=20a20c781ac2143e92807fa8dfab086a5b7c1d53;p=mesa.git ralloc: Move declaration before code. Fixes build error with MSVC. --- 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); }