Mesa (master): mesa: Remove unnecessary condition.

Matt Turner mattst88 at kemper.freedesktop.org
Fri Feb 21 18:14:05 UTC 2014


Module: Mesa
Branch: master
Commit: 941769be81f3486f2793fbcdb3f70f468a073152
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=941769be81f3486f2793fbcdb3f70f468a073152

Author: Courtney Goeltzenleuchter <courtney at lunarg.com>
Date:   Fri Feb 21 10:31:43 2014 -0700

mesa: Remove unnecessary condition.

Identified by Valgrind memory check. Initialized block-opaque in a
different patch. This test seems unnecessary. If opaque must be true,
just set to true.

Reviewed-by: Matt Turner <mattst88 at gmail.com>
Signed-off-by: Courtney Goeltzenleuchter <courtney at LunarG.com>

---

 src/mesa/main/texcompress_etc.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mesa/main/texcompress_etc.c b/src/mesa/main/texcompress_etc.c
index e3862be..cbda689 100644
--- a/src/mesa/main/texcompress_etc.c
+++ b/src/mesa/main/texcompress_etc.c
@@ -429,8 +429,7 @@ etc2_rgb8_parse_block(struct etc2_block *block,
       block->is_planar_mode = true;
 
       /* opaque bit must be set in planar mode */
-      if (!block->opaque)
-         block->opaque = true;
+      block->opaque = true;
 
       for (i = 0; i < 3; i++) {
          block->base_colors[0][i] = etc2_base_color_o_planar(src, i);




More information about the mesa-commit mailing list