Signed-off-by: Michael Stefaniuc mstefani@winehq.org --- parameter is checked for not NULL at the beginning of the function.
Those conditional expressions are blamed on 847f772fe1d but that just split an existing if (parameter) else construct.
dlls/d3dx9_36/effect.c | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/dlls/d3dx9_36/effect.c b/dlls/d3dx9_36/effect.c index e8ae7b54c2..1abc8dc7c8 100644 --- a/dlls/d3dx9_36/effect.c +++ b/dlls/d3dx9_36/effect.c @@ -948,15 +948,14 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, return NULL; }
- count = parameter ? parameter->member_count : base->parameter_count; + count = parameter->member_count;
length = strcspn( name, "[.@" ); part = name + length;
for (i = 0; i < count; i++) { - temp_parameter = !parameter ? &base->parameters[i].param - : ¶meter->members[i]; + temp_parameter = ¶meter->members[i];
if (!strcmp(temp_parameter->name, name)) { @@ -971,13 +970,8 @@ struct d3dx_parameter *get_parameter_by_name(struct d3dx9_base_effect *base, return get_parameter_by_name(base, temp_parameter, part);
case '@': - { - struct d3dx_top_level_parameter *top_param - = top_level_parameter_from_parameter(temp_parameter); + return NULL;
- return parameter ? NULL : get_annotation_by_name(base, top_param->annotation_count, - top_param->annotations, part); - } case '[': return get_parameter_element_by_name(base, temp_parameter, part);