diff --git a/src/common/l1sap.c b/src/common/l1sap.c index e9bab6164..53a083d8c 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -1243,7 +1243,7 @@ static bool rtppayload_is_octet_aligned(const uint8_t *rtp_pl, uint8_t payload_l #define AMR_PADDING1(rtp_pl) (rtp_pl[0] & 0x0f) #define AMR_PADDING2(rtp_pl) (rtp_pl[1] & 0x03) - if(payload_len < 2 || AMR_PADDING1(rtp_pl) || AMR_PADDING2(rtp_pl)) + if (payload_len < 2 || AMR_PADDING1(rtp_pl) || AMR_PADDING2(rtp_pl)) return false; return true; @@ -1253,7 +1253,7 @@ static bool rtppayload_is_valid(struct gsm_lchan *lchan, struct msgb *resp_msg) { /* Avoid sending bw-efficient AMR to lower layers, most bts models * don't support it. */ - if(lchan->tch_mode == GSM48_CMODE_SPEECH_AMR && + if (lchan->tch_mode == GSM48_CMODE_SPEECH_AMR && !rtppayload_is_octet_aligned(resp_msg->data, resp_msg->len)) { LOGPLCHAN(lchan, DL1P, LOGL_NOTICE, "RTP->L1: Dropping unexpected AMR encoding (bw-efficient?) %s\n", @@ -1302,7 +1302,7 @@ static int l1sap_tch_rts_ind(struct gsm_bts_trx *trx, if (!resp_msg) { DEBUGPGT(DL1P, &g_time, "%s DL TCH Tx queue underrun\n", gsm_lchan_name(lchan)); resp_l1sap = &empty_l1sap; - } else if(!rtppayload_is_valid(lchan, resp_msg)) { + } else if (!rtppayload_is_valid(lchan, resp_msg)) { msgb_free(resp_msg); resp_msg = NULL; resp_l1sap = &empty_l1sap; diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 1817849fa..bd2c4b76f 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -321,17 +321,17 @@ static inline bool dtx_amr_sid_optional(struct gsm_lchan *lchan, uint32_t fn) already: we rely here on the order of RTS arrival from L1 - we expect that PH-DATA.req ALWAYS comes before PH-TCH.req for the same FN */ - if(lchan->type == GSM_LCHAN_TCH_H) { + if (lchan->type == GSM_LCHAN_TCH_H) { if (lchan->tch.dtx.fn != LCHAN_FN_DUMMY && lchan->tch.dtx.fn != LCHAN_FN_WAIT) { /* FACCH interruption is over */ dtx_dispatch(lchan, E_COMPL); return false; - } else if(lchan->tch.dtx.fn == LCHAN_FN_DUMMY) { + } else if (lchan->tch.dtx.fn == LCHAN_FN_DUMMY) { lchan->tch.dtx.fn = LCHAN_FN_WAIT; } else lchan->tch.dtx.fn = fn; - } else if(lchan->type == GSM_LCHAN_TCH_F) { + } else if (lchan->type == GSM_LCHAN_TCH_F) { if (lchan->tch.dtx.fn != LCHAN_FN_DUMMY) { /* FACCH interruption is over */ dtx_dispatch(lchan, E_COMPL); diff --git a/src/common/rsl.c b/src/common/rsl.c index 94d00226f..0a519aff4 100644 --- a/src/common/rsl.c +++ b/src/common/rsl.c @@ -3659,7 +3659,7 @@ int lapdm_rll_tx_cb(struct msgb *msg, struct lapdm_entity *le, void *ctx) "Scheduling %s to L3 in next associated TCH-RTS.ind\n", rsl_msg_name(rh->msg_type)); - if(lchan->pending_rel_ind_msg) { + if (lchan->pending_rel_ind_msg) { LOGPLCHAN(lchan, DRSL, LOGL_INFO, "Dropping pending release indication message\n"); msgb_free(lchan->pending_rel_ind_msg);