region_compile中compile_rule缓存数组的大小,调整为与调用参数相同。去除部分无效代码。

This commit is contained in:
zhengchao
2020-12-05 16:54:04 +06:00
parent f8ca593ea1
commit a925ed039d
4 changed files with 17 additions and 27 deletions

View File

@@ -226,7 +226,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c
int scan_ret=0;
int i=0;
struct Maat_compile_rule* compile_rule_array[MAX_SCANNER_HIT_NUM];
struct Maat_compile_rule* compile_rule_array[size];
struct Maat_compile_rule* compile_rule=NULL;
int virtual_table_id=0;
@@ -247,7 +247,7 @@ int region_compile(_Maat_feather_t*feather, struct Maat_hierarchy_compile_mid* c
Maat_hierarchy_compile_mid_udpate(compile_mid, region->region_id, virtual_table_id, region_hit_wraper->Nth_scan, i);
}
scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, MAX_SCANNER_HIT_NUM);
scan_ret=Maat_hierarchy_region_compile(compile_mid, is_last_region, (void**)compile_rule_array, size);
//Maat_hierarchy is rwlock protected, it always returns non-NULL compile_rule.
if(scan_ret>1)
{