summaryrefslogtreecommitdiffstats
path: root/dimension/directives.rules
diff options
context:
space:
mode:
Diffstat (limited to 'dimension/directives.rules')
-rw-r--r--dimension/directives.rules8
1 files changed, 1 insertions, 7 deletions
diff --git a/dimension/directives.rules b/dimension/directives.rules
index db47bb9..5bbd813 100644
--- a/dimension/directives.rules
+++ b/dimension/directives.rules
@@ -48,13 +48,7 @@ RVALUE: ARITH_EXPR ";" %dprec 2 {
CONDITIONAL: ARITH_EXPR {
/* Force the expression to be evaluated logically */
- dmnsn_astnode zero = dmnsn_new_astnode(DMNSN_AST_INTEGER, @$);
- zero.ptr = malloc(sizeof(long));
- if (!zero.ptr)
- dmnsn_error(DMNSN_SEVERITY_HIGH,
- "Failed to allocate room for integer.");
- *(long *)zero.ptr = 0;
-
+ dmnsn_astnode zero = dmnsn_new_ast_integer(0);
$$ = dmnsn_new_astnode2(DMNSN_AST_OR, @$, zero, $1);
}
| ARITH_EXPR "=" ARITH_EXPR {