diff options
| author | liuwentan <[email protected]> | 2023-12-20 06:16:23 +0000 |
|---|---|---|
| committer | liuwentan <[email protected]> | 2023-12-20 06:16:23 +0000 |
| commit | 580a594806928096fc220bda0033ed8c209f97b6 (patch) | |
| tree | 7a32185de1d7901b644ba898cb179a5bcc8cb7e4 /scanner/expr_matcher/expr_matcher.cpp | |
| parent | e65239abe7c579f56c31391224380fe8ea82196a (diff) | |
[PATCH] Add bloom filter to optimize expr_matcher performance
Diffstat (limited to 'scanner/expr_matcher/expr_matcher.cpp')
| -rw-r--r-- | scanner/expr_matcher/expr_matcher.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scanner/expr_matcher/expr_matcher.cpp b/scanner/expr_matcher/expr_matcher.cpp index 16ec4ee..3a8f9e9 100644 --- a/scanner/expr_matcher/expr_matcher.cpp +++ b/scanner/expr_matcher/expr_matcher.cpp @@ -13,6 +13,7 @@ #include <sys/syscall.h> #include "log/log.h" +#include "bloom/bloom.h" #include "maat_utils.h" #include "../bool_matcher/bool_matcher.h" #include "expr_matcher_inc.h" @@ -409,7 +410,7 @@ static int expr_matcher_bool_matcher_match(struct bool_matcher *bm, struct bool_ unsigned long long unique_pat_ids[n_hit_pattern]; size_t n_unique_pat_id = 0; - qsort(hit_pattern_ids, n_hit_pattern, sizeof(unsigned long long *), compare_pattern_id); + qsort(hit_pattern_ids, n_hit_pattern, sizeof(unsigned long long), compare_pattern_id); for (size_t i = 0; i < n_hit_pattern; i++) { tmp_pat_id = hit_pattern_ids[i]; |
