summaryrefslogtreecommitdiff
path: root/filter
diff options
context:
space:
mode:
authorJan Maria Matejka <mq@ucw.cz>2018-12-17 12:58:01 +0100
committerMaria Matejka <mq@ucw.cz>2019-02-20 22:30:54 +0100
commit25566c68109381178e0305f3e7e1464dea15b90b (patch)
tree2d6fb12dcc9cc7b8fb848226fb70612880b98320 /filter
parentaca8263926df6156322e1a1157886f1cad2486b1 (diff)
Filter refactoring: Moved the bitfield bit position formula to route.h
Diffstat (limited to 'filter')
-rw-r--r--filter/filter.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/filter/filter.c b/filter/filter.c
index f5efe894..5829fd51 100644
--- a/filter/filter.c
+++ b/filter/filter.c
@@ -597,9 +597,6 @@ val_format_str(struct filter_state *fs, struct f_val v) {
static struct tbf rl_runtime_err = TBF_DEFAULT_LOG_LIMITS;
-#define BITFIELD_MASK(what) \
- (1u << (what->a2.i >> 24))
-
/**
* interpret
* @fs: filter state
@@ -656,6 +653,8 @@ interpret(struct filter_state *fs, struct f_inst *what)
#define ACCESS_EATTRS \
do { if (!fs->eattrs) f_cache_eattrs(fs); } while (0)
+#define BITFIELD_MASK(what_) (1u << EA_BIT_GET(what_->a2.i))
+
/* Binary operators */
case FI_ADD:
ARG(1,T_INT);