Mesa (glsl2): ir_constant_expression: Initialize op[0] and op[1] to NULL.
Ian Romanick
idr at kemper.freedesktop.org
Tue Jul 6 23:13:31 UTC 2010
Module: Mesa
Branch: glsl2
Commit: 6bc432e14e12c280bc53e57338bf86fbf8d26885
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=6bc432e14e12c280bc53e57338bf86fbf8d26885
Author: Kenneth Graunke <kenneth at whitecape.org>
Date: Fri Jul 2 17:12:23 2010 -0700
ir_constant_expression: Initialize op[0] and op[1] to NULL.
This makes it easy to check if there is a second argument.
---
src/glsl/ir_constant_expression.cpp | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/glsl/ir_constant_expression.cpp b/src/glsl/ir_constant_expression.cpp
index 1b81017..6d6ee09 100644
--- a/src/glsl/ir_constant_expression.cpp
+++ b/src/glsl/ir_constant_expression.cpp
@@ -129,7 +129,7 @@ void
ir_constant_visitor::visit(ir_expression *ir)
{
value = NULL;
- ir_constant *op[2];
+ ir_constant *op[2] = { NULL, NULL };
unsigned int operand, c;
ir_constant_data data;
More information about the mesa-commit
mailing list