<p dir="ltr"><br>
On Apr 17, 2016 1:56 PM, "Dave Airlie" <<a href="mailto:airlied@gmail.com">airlied@gmail.com</a>> wrote:<br>
><br>
> From: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
><br>
> Pointed out by coverity.<br>
><br>
> Signed-off-by: Dave Airlie <<a href="mailto:airlied@redhat.com">airlied@redhat.com</a>><br>
> ---<br>
> src/compiler/nir/nir_builder.h | 2 +-<br>
> 1 file changed, 1 insertion(+), 1 deletion(-)<br>
><br>
> diff --git a/src/compiler/nir/nir_builder.h b/src/compiler/nir/nir_builder.h<br>
> index 29b13fb..1425dba 100644<br>
> --- a/src/compiler/nir/nir_builder.h<br>
> +++ b/src/compiler/nir/nir_builder.h<br>
> @@ -79,10 +79,10 @@ nir_ssa_undef(nir_builder *build, unsigned num_components, unsigned bit_size)<br>
> {<br>
> nir_ssa_undef_instr *undef =<br>
> nir_ssa_undef_instr_create(build->shader, num_components, bit_size);<br>
> - undef->def.bit_size = bit_size;<br>
> if (!undef)<br>
> return NULL;<br>
><br>
> + undef->def.bit_size = bit_size;</p>
<p dir="ltr">You can just can this line instead. We just passed bit_size into the constructor function.</p>
<p dir="ltr">> nir_instr_insert(nir_before_cf_list(&build->impl->body), &undef->instr);<br>
><br>
> return &undef->def;<br>
> --<br>
> 2.5.5<br>
><br>
> _______________________________________________<br>
> mesa-dev mailing list<br>
> <a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
> <a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev">https://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</p>