From 6fda8b2b4df508e541c712f9d07295f262577f65 Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Tue, 21 Nov 2017 21:27:21 +0200 Subject: [PATCH] Bluetooth: Mesh: Friend: Fix poll timeout type The Poll Timeout needs to be at least 24 bits, so u16_t doesn't suffice and will potentially result in truncation. Use u32_t, thereby also fixing a coverity warning. Signed-off-by: Johan Hedberg --- subsys/bluetooth/host/mesh/friend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/host/mesh/friend.c b/subsys/bluetooth/host/mesh/friend.c index 7f4d4e215a..5e07923ca2 100644 --- a/subsys/bluetooth/host/mesh/friend.c +++ b/subsys/bluetooth/host/mesh/friend.c @@ -777,7 +777,7 @@ int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf) struct bt_mesh_subnet *sub = rx->sub; struct bt_mesh_friend *frnd = NULL; u16_t old_friend; - u16_t poll_to; + u32_t poll_to; int i; if (buf->len < sizeof(*msg)) {