Also fixes some more failed asserts due to add_tail().
void
cf_push_scope(struct symbol *sym)
{
- struct sym_scope *s = cfg_alloc(sizeof(struct sym_scope));
+ struct sym_scope *s = cfg_allocz(sizeof(struct sym_scope));
s->next = conf_this_scope;
conf_this_scope = s;
definition:
DEFINE symbol '=' term ';' {
- struct f_val *val = cfg_alloc(sizeof(struct f_val));
+ struct f_val *val = cfg_allocz(sizeof(struct f_val));
if (f_eval(f_linearize($4), cfg_mem, val) > F_RETURN) cf_error("Runtime error");
cf_define_symbol($2, SYM_CONSTANT | val->type, val, val);
}
struct f_tree *
f_new_tree(void)
{
- struct f_tree * ret;
- ret = cfg_alloc(sizeof(struct f_tree));
- ret->left = ret->right = NULL;
- ret->from.type = ret->to.type = T_VOID;
- ret->from.val.i = ret->to.val.i = 0;
- ret->data = NULL;
+ struct f_tree *ret = cfg_allocz(sizeof(struct f_tree));
return ret;
}
password_item_begin:
PASSWORD text {
if (!this_p_list) {
- this_p_list = cfg_alloc(sizeof(list));
+ this_p_list = cfg_allocz(sizeof(list));
init_list(this_p_list);
password_id = 1;
}
- this_p_item = cfg_alloc(sizeof (struct password_item));
+ this_p_item = cfg_allocz(sizeof(struct password_item));
this_p_item->password = $2;
this_p_item->length = strlen($2);
this_p_item->genfrom = 0;