diff options
author | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-25 22:33:57 +0200 |
---|---|---|
committer | Ondrej Zajicek <santiago@crfreenet.org> | 2013-07-25 22:33:57 +0200 |
commit | 1103b32e830fbf98d9b3e32c0425b9a589773bf8 (patch) | |
tree | 9d3577cf205e74002ea43e7754f3391cc1e4992d /sysdep/unix | |
parent | ac5745134847c044b21c311e5ab11d92d05bacc1 (diff) |
Allows to define constants of all filter types.
Diffstat (limited to 'sysdep/unix')
-rw-r--r-- | sysdep/unix/main.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sysdep/unix/main.c b/sysdep/unix/main.c index 23040e54..bd80ba2c 100644 --- a/sysdep/unix/main.c +++ b/sysdep/unix/main.c @@ -97,9 +97,10 @@ static inline void add_num_const(char *name, int val) { struct symbol *s = cf_find_symbol(name); - s->class = SYM_NUMBER; - s->def = NULL; - s->aux = val; + s->class = SYM_CONSTANT | T_INT; + s->def = cfg_allocz(sizeof(struct f_val)); + SYM_TYPE(s) = T_INT; + SYM_VAL(s).i = val; } /* the code of read_iproute_table() is based on |