Reviewed-by: Ilia Mirkin <[email protected]>
On Sun, Nov 15, 2015 at 2:05 AM, Vinson Lee <[email protected]> wrote: > Fixes "identical code for different branches" defect reported by Coverity. > > Signed-off-by: Vinson Lee <[email protected]> > --- > tests/spec/arb_copy_image/formats.c | 15 +++++---------- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git a/tests/spec/arb_copy_image/formats.c > b/tests/spec/arb_copy_image/formats.c > index a4c027e..5ae6631 100644 > --- a/tests/spec/arb_copy_image/formats.c > +++ b/tests/spec/arb_copy_image/formats.c > @@ -276,17 +276,12 @@ are_formats_compatible(struct texture_format *f1, > struct texture_format *f2) > if (!f1->can_be_reinterpreted || !f2->can_be_reinterpreted) > return false; > > - if (is_format_compressed(f1)) { > - if (is_format_compressed(f2)) > - /* Compressed-to-compressed copies are not supported > */ > - return false; > - > - return f1->bytes == f2->bytes; > - } else if (is_format_compressed(f2)) { > - return f1->bytes == f2->bytes; > - } else { > - return f1->bytes == f2->bytes; > + if (is_format_compressed(f1) && is_format_compressed(f2)) { > + /* Compressed-to-compressed copies are not supported */ > + return false; > } > + > + return f1->bytes == f2->bytes; > } > > static const float green[3] = {0.0, 1.0, 0.0}; > -- > 2.4.9 (Apple Git-60) > _______________________________________________ Piglit mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/piglit
