diff --git a/dlls/d3dcompiler_43/reflection.c b/dlls/d3dcompiler_43/reflection.c index e2955f048b3..ff67d7b310f 100644 --- a/dlls/d3dcompiler_43/reflection.c +++ b/dlls/d3dcompiler_43/reflection.c @@ -1686,11 +1686,7 @@ static HRESULT d3dcompiler_shader_reflection_init(struct d3dcompiler_shader_refl reflection->ID3D11ShaderReflection_iface.lpVtbl = &d3dcompiler_shader_reflection_vtbl; reflection->refcount = 1; - if (wine_rb_init(&reflection->types, &d3dcompiler_shader_reflection_type_rb_functions) == -1) - { - ERR("Failed to initialize type rbtree.\n"); - return E_FAIL; - } + wine_rb_init(&reflection->types, &d3dcompiler_shader_reflection_type_rb_functions); hr = dxbc_parse(data, data_size, &src_dxbc); if (FAILED(hr)) diff --git a/dlls/d3dcompiler_43/utils.c b/dlls/d3dcompiler_43/utils.c index e131d9985ef..ddf64e45da4 100644 --- a/dlls/d3dcompiler_43/utils.c +++ b/dlls/d3dcompiler_43/utils.c @@ -1734,12 +1734,7 @@ void push_scope(struct hlsl_parse_ctx *ctx) } TRACE("Pushing a new scope\n"); list_init(&new_scope->vars); - if (wine_rb_init(&new_scope->types, &hlsl_type_rb_funcs) == -1) - { - ERR("Failed to initialize types rbtree.\n"); - d3dcompiler_free(new_scope); - return; - } + wine_rb_init(&new_scope->types, &hlsl_type_rb_funcs); new_scope->upper = ctx->cur_scope; ctx->cur_scope = new_scope; list_add_tail(&ctx->scopes, &new_scope->entry); @@ -1875,8 +1870,7 @@ static const struct wine_rb_functions function_rb_funcs = void init_functions_tree(struct wine_rb_tree *funcs) { - if (wine_rb_init(&hlsl_ctx.functions, &function_rb_funcs) == -1) - ERR("Failed to initialize functions rbtree.\n"); + wine_rb_init(&hlsl_ctx.functions, &function_rb_funcs); } static const char *debug_base_type(const struct hlsl_type *type) @@ -2513,11 +2507,7 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu TRACE("Function %s redeclared as a user defined function.\n", debugstr_a(name)); func->intrinsic = intrinsic; wine_rb_destroy(&func->overloads, free_function_decl_rb, NULL); - if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1) - { - ERR("Failed to initialize function rbtree.\n"); - return; - } + wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs); } decl->func = func; if ((old_entry = wine_rb_get(&func->overloads, decl->parameters))) @@ -2540,13 +2530,7 @@ void add_function_decl(struct wine_rb_tree *funcs, char *name, struct hlsl_ir_fu } func = d3dcompiler_alloc(sizeof(*func)); func->name = name; - if (wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs) == -1) - { - ERR("Failed to initialize function rbtree.\n"); - d3dcompiler_free(name); - d3dcompiler_free(func); - return; - } + wine_rb_init(&func->overloads, &hlsl_ir_function_decl_rb_funcs); decl->func = func; wine_rb_put(&func->overloads, decl->parameters, &decl->entry); func->intrinsic = intrinsic;