ir_constant_expression: Initialize op[0] and op[1] to NULL.
authorKenneth Graunke <kenneth@whitecape.org>
Sat, 3 Jul 2010 00:12:23 +0000 (17:12 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Tue, 6 Jul 2010 23:03:33 +0000 (16:03 -0700)
This makes it easy to check if there is a second argument.

src/glsl/ir_constant_expression.cpp

index 1b81017698ebdb9571addb499bfcec258dba2495..6d6ee093d791a3fd683e471dabaea5d6758a489b 100644 (file)
@@ -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;