nimble/transport; MYNEWT-737: Make ble_hci_uart_tx_char more efficient Per pull request review, add assert() if om is NULL. Did not modify the rest of the code in case assert() is compiled out by NDEBUG being defined.
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/5a869e3e Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/tree/5a869e3e Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/diff/5a869e3e Branch: refs/heads/master Commit: 5a869e3e2e791fd83e763a02fcecb4803de6ce37 Parents: be6ce3c Author: William San Filippo <wi...@runtime.io> Authored: Mon Apr 24 12:19:01 2017 -0700 Committer: William San Filippo <wi...@runtime.io> Committed: Mon Apr 24 12:19:01 2017 -0700 ---------------------------------------------------------------------- net/nimble/transport/uart/src/ble_hci_uart.c | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-mynewt-core/blob/5a869e3e/net/nimble/transport/uart/src/ble_hci_uart.c ---------------------------------------------------------------------- diff --git a/net/nimble/transport/uart/src/ble_hci_uart.c b/net/nimble/transport/uart/src/ble_hci_uart.c index a4c1855..19b89ae 100755 --- a/net/nimble/transport/uart/src/ble_hci_uart.c +++ b/net/nimble/transport/uart/src/ble_hci_uart.c @@ -338,6 +338,7 @@ ble_hci_uart_tx_char(void *arg) } /* NOTE: om should never be NULL! What to do? */ if (om == NULL) { + assert(0); ble_hci_uart_state.tx_type = BLE_HCI_UART_H4_NONE; } else { ble_hci_uart_state.tx_pkt.dptr = om->om_data;