summaryrefslogtreecommitdiff
path: root/src/maat_api.c
diff options
context:
space:
mode:
authorroot <[email protected]>2024-11-14 03:13:06 +0000
committerroot <[email protected]>2024-11-14 03:13:06 +0000
commitdf24326470e7ab75aadfc591791aebd8aaf50768 (patch)
tree78a141214955984a10ce659f14361e3a783492e6 /src/maat_api.c
parent2dfcf103c04d616beffa2d1582c990fa02360f3a (diff)
patch performance optimization from maat4HEADdevelop-version5
change some utarray to thread local variable, to reduce the frequency of calloc and free
Diffstat (limited to 'src/maat_api.c')
-rw-r--r--src/maat_api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/maat_api.c b/src/maat_api.c
index 5819102..34283db 100644
--- a/src/maat_api.c
+++ b/src/maat_api.c
@@ -1617,7 +1617,7 @@ static void maat_state_add_hit_object(struct maat_state *state, const char *attr
uuid_copy(hit_items[i].object_uuid, objects[i].object_uuid);
}
- rule_compile_state_update(state->rule_compile_state, maat_inst, attribute_name,
+ rule_compile_state_update(state, maat_inst, attribute_name,
state->rule_table_id, state->Nth_scan,
hit_items, n_hit_item);
}
@@ -2037,7 +2037,7 @@ int maat_state_get_hit_paths(struct maat_state *state, struct maat_hit_path *pat
void *object_group_runtime = table_manager_get_runtime(maat_inst->tbl_mgr, object_group_table_id);
size_t hit_path_cnt =
- rule_compile_state_get_internal_hit_paths(state->rule_compile_state,
+ rule_compile_state_get_internal_hit_paths(state,
(struct rule_runtime *)rule_rt,
(struct object_group_runtime *)object_group_runtime,
path_array, array_size);