summaryrefslogtreecommitdiffstats
path: root/src/host/layer23
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2019-05-23 16:02:16 +0300
committerVadim Yanitskiy <axilirator@gmail.com>2019-05-23 16:02:16 +0300
commit00513d65c85b31d528adbc91ad48952d9f75880f (patch)
tree47e52cf5943b020d7fa6d1898b6014a1460a053f /src/host/layer23
parent4b9a35136f820bca8cee5eb0220139dd0a92a3f0 (diff)
common/sap_fsm.c: fix missing pointer dereference
sap_fsm.c: In function ‘sap_negotiate_msg_size’: sap_fsm.c:103:15: warning: passing argument 1 of ‘__bswap_16’ makes integer from pointer without a cast [-Wint-conversion]: size = ntohs((uint16_t *) param->value); ^~~~~~~~~~~~~~~~~~~~~~~~~ Change-Id: Ie58af6162c67ae377809b42daa897ca3f3d72af1
Diffstat (limited to 'src/host/layer23')
-rw-r--r--src/host/layer23/src/common/sap_fsm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/host/layer23/src/common/sap_fsm.c b/src/host/layer23/src/common/sap_fsm.c
index f07488f0..22658917 100644
--- a/src/host/layer23/src/common/sap_fsm.c
+++ b/src/host/layer23/src/common/sap_fsm.c
@@ -100,7 +100,7 @@ static void sap_negotiate_msg_size(struct osmosap_entity *sap,
}
/* Parse MaxMsgSize suggested by server */
- size = ntohs((uint16_t *) param->value);
+ size = osmo_load16be(param->value);
if (size > SAP_MAX_MSG_SIZE) {
cause = "suggested MaxMsgSize is too big for us";
goto error;