pcu_emu/test: Initialise current_test
Currently the global current_test is not initialised, which leads to memory access failures. In addition, the variable is signed but used in comparisons with unsigned values. This commit changes the type to size_t and initialises the variable to 0. Sponsored-by: On-Waves ehf
This commit is contained in:
parent
0d39dc92b5
commit
0494c75a53
|
@ -35,7 +35,7 @@ extern "C" {
|
|||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
static int current_test;
|
||||
static size_t current_test;
|
||||
|
||||
/* Extern data to please the underlying code */
|
||||
void *tall_pcu_ctx;
|
||||
|
@ -115,6 +115,8 @@ int main(int argc, char **argv)
|
|||
vty_init(&pcu_vty_info);
|
||||
pcu_vty_init(&gprs_log_info);
|
||||
|
||||
current_test = 0;
|
||||
|
||||
init_main_bts();
|
||||
create_and_connect_bssgp(bts_main_data(), INADDR_LOOPBACK, 23000);
|
||||
|
||||
|
|
Loading…
Reference in New Issue