diff options
author | Maria Matejka <mq@ucw.cz> | 2022-07-11 11:08:10 +0200 |
---|---|---|
committer | Maria Matejka <mq@ucw.cz> | 2022-07-11 11:08:10 +0200 |
commit | 2e5bfeb73ac25e236a24b6c1a88d0f2221ca303f (patch) | |
tree | 396657a62a5a63b0a304268bd011934f56d414ce /sysdep/unix/main.c | |
parent | d429bc5c841a8e9d4c81786973edfa56d20a407e (diff) | |
parent | cb339a30677901f2c248de08ff535cf0a9efab3d (diff) |
Merge remote-tracking branch 'origin/master' into backport
Diffstat (limited to 'sysdep/unix/main.c')
-rw-r--r-- | sysdep/unix/main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 71749324..84e7d889 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -116,7 +116,7 @@ add_num_const(char *name, int val, const char *file, const uint line) struct f_val *v = cfg_alloc(sizeof(struct f_val)); *v = (struct f_val) { .type = T_INT, .val.i = val }; struct symbol *sym = cf_get_symbol(name); - if (sym->class && (sym->scope == conf_this_scope)) + if (sym->class && cf_symbol_is_local(sym)) cf_error("Error reading value for %s from %s:%d: already defined", name, file, line); cf_define_symbol(sym, SYM_CONSTANT | T_INT, val, v); |