From 194fd8744ad9752ffa614f50b35ea153b610e9c6 Mon Sep 17 00:00:00 2001 From: Gerald Pfeifer Date: Sun, 2 May 2010 20:48:39 +0200 Subject: [PATCH] widl: Simplify write_struct_tfs and remove an unused variable. --- tools/widl/typegen.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/widl/typegen.c b/tools/widl/typegen.c index 694e98d9753..8541c5a9c1b 100644 --- a/tools/widl/typegen.c +++ b/tools/widl/typegen.c @@ -2452,7 +2452,6 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, unsigned int total_size; const var_t *array; unsigned int start_offset; - unsigned int array_offset; unsigned int align; unsigned int corroff; var_t *f; @@ -2473,10 +2472,12 @@ static unsigned int write_struct_tfs(FILE *file, type_t *type, array = find_array_or_string_in_struct(type); if (array && !processed(array->type)) - array_offset - = is_string_type(array->attrs, array->type) - ? write_string_tfs(file, array->attrs, array->type, FALSE, array->name, tfsoff) - : write_array_tfs(file, array->attrs, array->type, array->name, tfsoff); + { + if(is_string_type(array->attrs, array->type)) + write_string_tfs(file, array->attrs, array->type, FALSE, array->name, tfsoff); + else + write_array_tfs(file, array->attrs, array->type, array->name, tfsoff); + } corroff = *tfsoff; write_descriptors(file, type, tfsoff);