nimble/hci: remove redundant check
Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/commit/88274894 Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/88274894 Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/88274894 Branch: refs/heads/develop Commit: 882748946137caa295dcf4f4753720910e8b37f0 Parents: 118e399 Author: MichaÅ Narajowski <[email protected]> Authored: Tue Jan 10 11:43:38 2017 +0100 Committer: MichaÅ Narajowski <[email protected]> Committed: Wed Jan 18 11:12:08 2017 +0100 ---------------------------------------------------------------------- net/nimble/host/src/ble_hs_hci_cmd.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/88274894/net/nimble/host/src/ble_hs_hci_cmd.c ---------------------------------------------------------------------- diff --git a/net/nimble/host/src/ble_hs_hci_cmd.c b/net/nimble/host/src/ble_hs_hci_cmd.c index f8e7dde..3cc3b98 100644 --- a/net/nimble/host/src/ble_hs_hci_cmd.c +++ b/net/nimble/host/src/ble_hs_hci_cmd.c @@ -1326,20 +1326,14 @@ int ble_hs_hci_cmd_build_set_resolv_priv_addr_timeout( uint16_t timeout, uint8_t *dst, int dst_len) { - int rc; - BLE_HS_DBG_ASSERT( dst_len >= BLE_HCI_CMD_HDR_LEN + BLE_HCI_SET_RESOLV_PRIV_ADDR_TO_LEN); ble_hs_hci_cmd_write_hdr(BLE_HCI_OGF_LE, BLE_HCI_OCF_LE_SET_RPA_TMO, BLE_HCI_SET_RESOLV_PRIV_ADDR_TO_LEN, dst); - rc = ble_hs_hci_cmd_body_set_resolv_priv_addr_timeout( + return ble_hs_hci_cmd_body_set_resolv_priv_addr_timeout( timeout, dst + BLE_HCI_CMD_HDR_LEN); - if (rc != 0) { - return rc; - } - return 0; } static int
