Bluetooth: Mesh: Remove unnecessary variable
Most places in bt_mesh_friend_req() used rx->sub (which is already quite short in itself), so just remove the only remaining user and the helper variable itself. Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
This commit is contained in:
parent
eb88bf2e62
commit
bed5472cab
@ -787,7 +787,6 @@ static s32_t offer_delay(struct bt_mesh_friend *frnd, s8_t rssi, u8_t crit)
|
||||
int bt_mesh_friend_req(struct bt_mesh_net_rx *rx, struct net_buf_simple *buf)
|
||||
{
|
||||
struct bt_mesh_ctl_friend_req *msg = (void *)buf->data;
|
||||
struct bt_mesh_subnet *sub = rx->sub;
|
||||
struct bt_mesh_friend *frnd = NULL;
|
||||
u16_t old_friend;
|
||||
u32_t poll_to;
|
||||
@ -876,7 +875,8 @@ init_friend:
|
||||
k_delayed_work_submit(&frnd->timer,
|
||||
offer_delay(frnd, rx->rssi, msg->criteria));
|
||||
|
||||
friend_cred_create(sub, frnd->lpn, frnd->lpn_counter, frnd->counter);
|
||||
friend_cred_create(rx->sub, frnd->lpn, frnd->lpn_counter,
|
||||
frnd->counter);
|
||||
|
||||
enqueue_offer(frnd, rx->rssi);
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user