comparison lwlib/lw_expr.c @ 87:b5785eb3441f

Actually initialize all fields of structure in lw_expr_create()
author lost@l-w.ca
date Wed, 22 Jun 2011 18:39:32 -0600
parents 18b49cf10ae9
children 19ca3108a223
comparison
equal deleted inserted replaced
86:00ddfdc1e1e3 87:b5785eb3441f
88 { 88 {
89 lw_expr_t r; 89 lw_expr_t r;
90 90
91 r = lw_alloc(sizeof(struct lw_expr_priv)); 91 r = lw_alloc(sizeof(struct lw_expr_priv));
92 r -> operands = NULL; 92 r -> operands = NULL;
93 93 r -> value2 = NULL;
94 r -> type = lw_expr_type_int;
95 r -> value = 0;
94 return r; 96 return r;
95 } 97 }
96 98
97 void lw_expr_destroy(lw_expr_t E) 99 void lw_expr_destroy(lw_expr_t E)
98 { 100 {