From 7afa1438866fa94454ba133608b6877171f71d37 Mon Sep 17 00:00:00 2001 From: Jan Maria Matejka Date: Mon, 17 Dec 2018 13:51:11 +0100 Subject: Filter refactoring: Passing the resulting struct f_val as a pointer. This also drops the multiplexing of errors with the f_val itself together with the T_RETURN f_val type flag. --- conf/confbase.Y | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'conf/confbase.Y') diff --git a/conf/confbase.Y b/conf/confbase.Y index 3fd034db..3d573e10 100644 --- a/conf/confbase.Y +++ b/conf/confbase.Y @@ -124,8 +124,7 @@ conf: definition ; definition: DEFINE SYM '=' term ';' { struct f_val *val = cfg_alloc(sizeof(struct f_val)); - *val = f_eval($4, cfg_mem); - if (val->type == T_RETURN) cf_error("Runtime error"); + if (f_eval($4, cfg_mem, val) > F_RETURN) cf_error("Runtime error"); cf_define_symbol($2, SYM_CONSTANT | val->type, val); } ; -- cgit v1.2.3