l1sap: use TLVP_PRES_LEN() macro in l1sap_chan_act()
Change-Id: I6793623622fd7303d7dc22117a163a6990497c28 Related: SYS#4895, OS#4941
This commit is contained in:
parent
180ddb0da3
commit
1adcc27eb9
|
@ -1969,8 +1969,7 @@ int l1sap_chan_act(struct gsm_bts_trx *trx, uint8_t chan_nr, struct tlv_parsed *
|
|||
|
||||
/* osmo-pcu calls this without a valid 'tp' parameter, so we
|
||||
* need to make sure ew don't crash here */
|
||||
if (tp && TLVP_PRESENT(tp, GSM48_IE_CHANDESC_2) &&
|
||||
TLVP_LEN(tp, GSM48_IE_CHANDESC_2) >= sizeof(*cd)) {
|
||||
if (tp && TLVP_PRES_LEN(tp, GSM48_IE_CHANDESC_2, sizeof(*cd))) {
|
||||
cd = (struct gsm48_chan_desc *)
|
||||
TLVP_VAL(tp, GSM48_IE_CHANDESC_2);
|
||||
|
||||
|
|
Loading…
Reference in New Issue