diff options
author | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-07 03:56:03 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2021-04-07 04:53:27 +0200 |
commit | 1adcc27eb9835f290e4f152ef5931e6d4c766c91 (patch) | |
tree | cd7ee9892a27af2e8163f1f9b5374b1755e3d0b3 | |
parent | 180ddb0da3a84b33e4dfad0bee6d34635749180b (diff) |
l1sap: use TLVP_PRES_LEN() macro in l1sap_chan_act()
-rw-r--r-- | src/common/l1sap.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c index aee47179..3ebe8e19 100644 --- a/src/common/l1sap.c +++ b/src/common/l1sap.c @@ -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); |