On 11/30/2012 12:34 AM, Dave Airlie wrote:
Reported by coverity scan.

v2: fix second case

Signed-off-by: Dave Airlie <airl...@redhat.com>

This should also go into stable branches. It should only affect debug builds.

Reviewed-by: Ian Romanick <ian.d.roman...@intel.com>

---
  src/glsl/ir_validate.cpp | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/glsl/ir_validate.cpp b/src/glsl/ir_validate.cpp
index af0b576..ad57a31 100644
--- a/src/glsl/ir_validate.cpp
+++ b/src/glsl/ir_validate.cpp
@@ -120,7 +120,7 @@ ir_visitor_status
  ir_validate::visit_leave(ir_loop *ir)
  {
     if (ir->counter != NULL) {
-      if ((ir->from == NULL) || (ir->from == NULL) || (ir->increment == NULL)) 
{
+      if ((ir->from == NULL) || (ir->to == NULL) || (ir->increment == NULL)) {
         printf("ir_loop has invalid loop controls:\n"
                "    counter:   %p\n"
                "    from:      %p\n"
@@ -136,7 +136,7 @@ ir_validate::visit_leave(ir_loop *ir)
         abort();
        }
     } else {
-      if ((ir->from != NULL) || (ir->from != NULL) || (ir->increment != NULL)) 
{
+      if ((ir->from != NULL) || (ir->to != NULL) || (ir->increment != NULL)) {
         printf("ir_loop has invalid loop controls:\n"
                "    counter:   %p\n"
                "    from:      %p\n"


_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to