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
@@ -120,7 +120,7 @@ int EmmDeregisteredAttemptingToAttach(nas_user_t *user, const emm_reg_t *evt)
/*
* Data failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
break;
default:
@@ -133,7 +133,7 @@ int EmmDeregisteredLimitedService(nas_user_t *user, const emm_reg_t *evt)
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, true);
break;
case _EMMREG_LOWERLAYER_RELEASE:
@@ -141,7 +141,7 @@ int EmmDeregisteredNormalService(nas_user_t *user, const emm_reg_t *evt)
/*
* Initial NAS message failed to be delivered to the network
*/
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, TRUE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, true);
break;
case _EMMREG_LOWERLAYER_RELEASE:
+1 -1
View File
@@ -143,7 +143,7 @@ int EmmRegistered(nas_user_t *user, const emm_reg_t *evt)
/*
* Data transfer message failed to be delivered
*/
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
break;
case _EMMREG_LOWERLAYER_RELEASE:
@@ -240,7 +240,7 @@ int EmmRegisteredInitiated(nas_user_t *user, const emm_reg_t *evt)
* any message transfered by EMM common procedures requested
* by the network.
*/
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, FALSE);
rc = emm_proc_lowerlayer_failure(user->lowerlayer_data, false);
break;
case _EMMREG_LOWERLAYER_RELEASE:
+3 -3
View File
@@ -679,7 +679,7 @@ static int _emm_as_cell_info_res(nas_user_t *user, const emm_as_cell_info_t *msg
int AcT = NET_ACCESS_EUTRAN;
if (msg->found == TRUE) {
if (msg->found == true) {
/* Get the first supported access technology */
while (AcT != NET_ACCESS_UNAVAILABLE) {
if (msg->rat & (1 << AcT)) {
@@ -1081,7 +1081,7 @@ static int _emm_as_data_req(const emm_data_t *emm_data, const emm_as_data_t *msg
LOG_FUNC_IN;
ul_info_transfer_req_t *as_msg = (ul_info_transfer_req_t *)ul_info_transfer_req_unaligned;
int size = 0;
int is_encoded = FALSE;
bool is_encoded = false;
LOG_TRACE(INFO, "EMMAS-SAP - Send AS data transfer request");
@@ -1114,7 +1114,7 @@ static int _emm_as_data_req(const emm_data_t *emm_data, const emm_as_data_t *msg
default:
/* Send other NAS messages as already encoded ESM messages */
size = msg->NASmsg.length;
is_encoded = TRUE;
is_encoded = true;
break;
}
+2 -2
View File
@@ -150,7 +150,7 @@ typedef struct emm_as_establish_s {
uint32_t ueid; /* UE lower layer identifier */
emm_as_EPS_identity_t UEid; /* UE's EPS mobile identity */
emm_as_security_data_t sctx;/* EPS NAS security context */
int switch_off; /* TRUE if the UE is switched off */
bool switch_off; /* true if the UE is switched off */
uint8_t type; /* Network attach/detach type */
uint8_t RRCcause; /* Connection establishment cause */
uint8_t RRCtype; /* Associated call type */
@@ -194,7 +194,7 @@ typedef struct emm_as_data_s {
uint32_t ueid; /* UE lower layer identifier */
const GUTI_t *guti; /* GUTI temporary mobile identity */
emm_as_security_data_t sctx;/* EPS NAS security context */
int switch_off; /* TRUE if the UE is switched off */
bool switch_off; /* true if the UE is switched off */
uint8_t type; /* Network detach type */
uint8_t delivered; /* Data message delivery indicator */
#define EMM_AS_NAS_DATA_ATTACH 0x01 /* Attach complete */
+2 -2
View File
@@ -71,9 +71,9 @@ typedef enum {
* ---------------------------------------------
*/
typedef struct {
int is_emergency; /* Indicates whether the PDN connection is established
bool is_emergency; /* Indicates whether the PDN connection is established
* for emergency bearer services only */
int is_attached; /* Indicates whether the UE remains attached to the
bool is_attached; /* Indicates whether the UE remains attached to the
* network */
} emm_esm_establish_t;
+2 -2
View File
@@ -100,7 +100,7 @@ typedef struct {
* -------------------------------------
*/
typedef struct {
int is_emergency; /* TRUE if the UE was attempting to register to
bool is_emergency; /* true if the UE was attempting to register to
* the network for emergency services only */
} emm_reg_attach_t;
@@ -109,7 +109,7 @@ typedef struct {
* -------------------------------------
*/
typedef struct {
int switch_off; /* TRUE if the UE is switched off */
bool switch_off; /* true if the UE is switched off */
int type; /* Network detach type */
} emm_reg_detach_t;