Module: kamailio Branch: master Commit: d7466474bdc86b2b0d0872c5fd41d743ec1c7d66 URL: https://github.com/kamailio/kamailio/commit/d7466474bdc86b2b0d0872c5fd41d743...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2024-07-11T15:44:07+02:00
core: counters - init local global variables
---
Modified: src/core/counters.c
---
Diff: https://github.com/kamailio/kamailio/commit/d7466474bdc86b2b0d0872c5fd41d743... Patch: https://github.com/kamailio/kamailio/commit/d7466474bdc86b2b0d0872c5fd41d743...
---
diff --git a/src/core/counters.c b/src/core/counters.c index 1a7d6637c17..5d9f26e5bce 100644 --- a/src/core/counters.c +++ b/src/core/counters.c @@ -70,22 +70,22 @@ struct grp_record /** hash table mapping a counter name to an id */ static struct str_hash_table cnts_hash_table; /** array mapping id 2 record */ -struct counter_record **cnt_id2record; -static int cnt_id2record_size; +struct counter_record **cnt_id2record = NULL; +static int cnt_id2record_size = 0; /** hash table for groups (maps a group name to a counter list) */ static struct str_hash_table grp_hash_table; /** array of groups, sorted */ -static struct grp_record **grp_sorted; -static int grp_sorted_max_size; -static int grp_sorted_crt_size; -static int grp_no; /* number of groups */ +static struct grp_record **grp_sorted = NULL; +static int grp_sorted_max_size = 0; +static int grp_sorted_crt_size = 0; +static int grp_no = 0; /* number of groups */
/** counters array. a[proc_no][counter_id] => _cnst_vals[proc_no*cnts_no+counter_id] */ counter_array_t *_cnts_vals = 0; -int _cnts_row_len; /* number of elements per row */ -static int cnts_no; /* number of registered counters */ -static int cnts_max_rows; /* set to 0 if not yet fully init */ +int _cnts_row_len = 0; /* number of elements per row */ +static int cnts_no = 0; /* number of registered counters */ +static int cnts_max_rows = 0; /* set to 0 if not yet fully init */ char *ksr_stats_namesep = KSR_STATS_NAMESEP;