Change in osmo-bts[master]: l1sap: use TLVP_PRES_LEN() macro in l1sap_chan_act()

laforge gerrit-no-reply at lists.osmocom.org
Wed Apr 7 16:19:32 UTC 2021


laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-bts/+/23671 )

Change subject: l1sap: use TLVP_PRES_LEN() macro in l1sap_chan_act()
......................................................................

l1sap: use TLVP_PRES_LEN() macro in l1sap_chan_act()

Change-Id: I6793623622fd7303d7dc22117a163a6990497c28
Related: SYS#4895, OS#4941
---
M src/common/l1sap.c
1 file changed, 1 insertion(+), 2 deletions(-)

Approvals:
  Jenkins Builder: Verified
  laforge: Looks good to me, approved



diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index aee4717..3ebe8e1 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1969,8 +1969,7 @@
 
 	/* 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);
 

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/23671
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I6793623622fd7303d7dc22117a163a6990497c28
Gerrit-Change-Number: 23671
Gerrit-PatchSet: 1
Gerrit-Owner: fixeria <vyanitskiy at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge at osmocom.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210407/911a8c94/attachment.htm>


More information about the gerrit-log mailing list