Skip to content

Commit ecc1a6d

Browse files
committed
nimble/host: Remove dead code from ble_l2cap_sig_coc_disconnect_cb
This is static function and all callers pass valid proc so no need for runtime check (make it assert).
1 parent 318efbf commit ecc1a6d

File tree

1 file changed

+1
-11
lines changed

1 file changed

+1
-11
lines changed

nimble/host/src/ble_l2cap_sig.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1666,25 +1666,15 @@ static void
16661666
ble_l2cap_sig_coc_disconnect_cb(struct ble_l2cap_sig_proc *proc, int status)
16671667
{
16681668
struct ble_l2cap_chan *chan;
1669-
struct ble_l2cap_event event;
16701669
struct ble_hs_conn *conn;
16711670

1672-
if (!proc) {
1673-
return;
1674-
}
1671+
assert(proc);
16751672

1676-
memset(&event, 0, sizeof(event));
16771673
chan = proc->disconnect.chan;
1678-
16791674
if (!chan) {
16801675
return;
16811676
}
16821677

1683-
if (!chan->cb) {
1684-
goto done;
1685-
}
1686-
1687-
done:
16881678
ble_hs_lock();
16891679
conn = ble_hs_conn_find_assert(chan->conn_handle);
16901680
if (conn) {

0 commit comments

Comments
 (0)