diff options
author | Dave Airlie <airlied@gmail.com> | 2012-11-30 18:33:21 +1000 |
---|---|---|
committer | Dave Airlie <airlied@gmail.com> | 2012-12-01 11:24:16 +1000 |
commit | e85c9a4d2874a302195c66742b446f0645440c43 (patch) | |
tree | c0f4000c1aaccc026aea2c3e6800e976f2863ab1 /src/glsl/ir_validate.cpp | |
parent | 67c8e96f5ace67f9c17556934ee9532877d3a00f (diff) | |
download | external_mesa3d-e85c9a4d2874a302195c66742b446f0645440c43.zip external_mesa3d-e85c9a4d2874a302195c66742b446f0645440c43.tar.gz external_mesa3d-e85c9a4d2874a302195c66742b446f0645440c43.tar.bz2 |
glsl: fix cut-n-paste error in error handling. (v2)
Reported by coverity scan.
v2: fix second case
Note: This is a candidate for stable branches.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'src/glsl/ir_validate.cpp')
-rw-r--r-- | src/glsl/ir_validate.cpp | 4 |
1 files 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" |