From 2e6aee9fe6aae109c76c5259f5bab0fa4a877164 Mon Sep 17 00:00:00 2001 From: Rene Rivera Date: Tue, 5 Aug 2003 04:48:28 +0000 Subject: [PATCH] Fix compilation for conforming C compilers, in this case VC7. Variable declarations are only allowed at the start of scopes, not in the middle like C++. [SVN r19455] --- src/engine/builtins.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/engine/builtins.c b/src/engine/builtins.c index 728937523..016c981ad 100644 --- a/src/engine/builtins.c +++ b/src/engine/builtins.c @@ -933,6 +933,7 @@ LIST *builtin_normalize_path( PARSE *parse, FRAME *frame ) char* current; /* Working pointer. */ int dotdots = 0; /* Number of '..' elements seen and not processed yet. */ int rooted = arg1->string[0] == '/'; + char* result; /* Make a copy of input: we should not change it. */ string_new(in); @@ -998,7 +999,7 @@ LIST *builtin_normalize_path( PARSE *parse, FRAME *frame ) string_push_back(out, *current); - char* result = newstr(out->size ? out->value : (rooted ? "/" : ".")); + result = newstr(out->size ? out->value : (rooted ? "/" : ".")); string_free(in); string_free(out);