From b3f807a14253d9464f5cc3ce6ec9aabf10166073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Bernon?= Date: Thu, 4 Feb 2021 17:43:39 +0100 Subject: [PATCH] widl: Remove useless find_type_or_error2 helper. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: RĂ©mi Bernon Signed-off-by: Jacek Caban Signed-off-by: Alexandre Julliard --- tools/widl/parser.y | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/tools/widl/parser.y b/tools/widl/parser.y index 480552e3723..328829cc0da 100644 --- a/tools/widl/parser.y +++ b/tools/widl/parser.y @@ -76,7 +76,6 @@ static warning_list_t *append_warning(warning_list_t *, int); static type_t *reg_typedefs(decl_spec_t *decl_spec, var_list_t *names, attr_list_t *attrs); static type_t *find_type_or_error(const char *name, int t); -static type_t *find_type_or_error2(char *name, int t); static var_t *reg_const(var_t *var); @@ -1015,7 +1014,7 @@ interfacedef: interfacehdr inherit | interfacehdr ':' aIDENTIFIER '{' import int_statements '}' semicolon_opt { $$ = $1; - type_interface_define($$, find_type_or_error2($3, 0), $6); + type_interface_define($$, find_type_or_error($3, 0), $6); } | dispinterfacedef semicolon_opt { $$ = $1; } ; @@ -1255,7 +1254,7 @@ acf_int_statement acf_interface : acf_attributes tINTERFACE aKNOWNTYPE '{' acf_int_statements '}' - { type_t *iface = find_type_or_error2($3, 0); + { type_t *iface = find_type_or_error($3, 0); if (type_get_type(iface) != TYPE_INTERFACE) error_loc("%s is not an interface\n", iface->name); iface->attrs = append_attr_list(iface->attrs, $1); @@ -2105,13 +2104,6 @@ static type_t *find_type_or_error(const char *name, int t) return type; } -static type_t *find_type_or_error2(char *name, int t) -{ - type_t *tp = find_type_or_error(name, t); - free(name); - return tp; -} - int is_type(const char *name) { return find_type(name, current_namespace, 0) != NULL ||