aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilipp Maier <pmaier@sysmocom.de>2022-12-08 16:40:30 +0100
committerPhilipp Maier <pmaier@sysmocom.de>2022-12-08 17:02:13 +0100
commit82d92f703aadf5d4b2ac3c2455cef08c78099018 (patch)
tree8a5b6b395e403b92c40cb47c2fc6d1b0fee25b6d
parentffe2b28c9b6288c5161bbacbe679950401d0f1eb (diff)
l1sap: remove unused pointer variable
The pointer variable l1sap is only used to determine the size of the related struct but for nothing else. We can use the struct name in sizeof also directly and get rid of it. Change-Id: I93abdce1dec60d53ddceb1fce6e9e7451ba6283a
-rw-r--r--src/common/l1sap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/l1sap.c b/src/common/l1sap.c
index 8bcd4171..22b5e8c1 100644
--- a/src/common/l1sap.c
+++ b/src/common/l1sap.c
@@ -1882,7 +1882,6 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
{
struct gsm_lchan *lchan = rs->priv;
struct msgb *msg;
- struct osmo_phsap_prim *l1sap;
/* if we're in loopback mode, we don't accept frames from the
* RTP socket anymore */
@@ -1893,7 +1892,7 @@ void l1sap_rtp_rx_cb(struct osmo_rtp_socket *rs, const uint8_t *rtp_pl,
if (!msg)
return;
memcpy(msgb_put(msg, rtp_pl_len), rtp_pl, rtp_pl_len);
- msgb_pull(msg, sizeof(*l1sap));
+ msgb_pull(msg, sizeof(struct osmo_phsap_prim));
/* Store RTP header Marker bit in control buffer */
rtpmsg_marker_bit(msg) = marker;