Use (std) bool instead of custom bool types

OAI is riddled with boolean_t, FALSE, TRUE, etc. This makes no sense, as
there is a standard bool type, and could lead to nasty bugs if a
definition of a bool is non-standard (0 == false, true == !false). This
commit removes all non-standard bools in the whole project.
This commit is contained in:
Robert Schmidt
2022-06-27 10:07:48 +02:00
parent 6d030ea2fa
commit 0b91791f67
176 changed files with 1414 additions and 1573 deletions
+6 -6
View File
@@ -109,7 +109,7 @@ int pdcp_fifo_flush_sdus () {}
int pdcp_fifo_read_input_sdus_remaining_bytes () {}
int pdcp_fifo_read_input_sdus () {}
BOOL init_pdcp_entity(pdcp_t *pdcp_entity);
bool init_pdcp_entity(pdcp_t *pdcp_entity);
//-----------------------------------------------------------------------------
void pdcp_rlc_test_mac_rlc_loop (struct mac_data_ind *data_indP, struct mac_data_req *data_requestP, int* drop_countP, int *tx_packetsP, int* dropped_tx_packetsP) //-----------------------------------------------------------------------------
@@ -230,7 +230,7 @@ int main(int argc, char **argv)
pdcp_module_init();
logInit();
if (init_pdcp_entity(&pdcp_array[0][1]) == TRUE && init_pdcp_entity(&pdcp_array[1][1]) == TRUE)
if (init_pdcp_entity(&pdcp_array[0][1]) == true && init_pdcp_entity(&pdcp_array[1][1]) == true)
msg("PDCP entity initialization OK\n");
else {
msg("Cannot initialize PDCP entities!\n");
@@ -239,7 +239,7 @@ int main(int argc, char **argv)
/* Initialize PDCP state variables */
for (index = 0; index < 2; ++index) {
if (pdcp_init_seq_numbers(&pdcp_array[index][1]) == FALSE) {
if (pdcp_init_seq_numbers(&pdcp_array[index][1]) == false) {
msg("Cannot initialize %s PDCP entity!\n", ((index == 0) ? "first" : "second"));
exit(1);
}
@@ -275,11 +275,11 @@ int main(int argc, char **argv)
}
//-----------------------------------------------------------------------------
BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
bool init_pdcp_entity(pdcp_t *pdcp_entity)
//-----------------------------------------------------------------------------
{
if (pdcp_entity == NULL)
return FALSE;
return false;
/*
* Initialize sequence number state variables of relevant PDCP entity
@@ -292,6 +292,6 @@ BOOL init_pdcp_entity(pdcp_t *pdcp_entity)
pdcp_entity->last_submitted_pdcp_rx_sn = 4095;
pdcp_entity->seq_num_size = 12;
return TRUE;
return true;
}