You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by ja...@apache.org on 2021/07/30 15:27:52 UTC

[mynewt-nimble] branch master updated: transport/nrf5340: Fix assignment in assert

This is an automated email from the ASF dual-hosted git repository.

janc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mynewt-nimble.git


The following commit(s) were added to refs/heads/master by this push:
     new 498f3ad  transport/nrf5340: Fix assignment in assert
498f3ad is described below

commit 498f3ad1cefd6351610a33e8dc2e2136c6d71efb
Author: Szymon Janc <sz...@codecoup.pl>
AuthorDate: Fri Jul 30 15:23:46 2021 +0200

    transport/nrf5340: Fix assignment in assert
    
    Fix typo in assert which make it never catch intended error.
---
 nimble/transport/nrf5340/src/nrf5340_ble_hci.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/nimble/transport/nrf5340/src/nrf5340_ble_hci.c b/nimble/transport/nrf5340/src/nrf5340_ble_hci.c
index c0276c3..9bf956b 100644
--- a/nimble/transport/nrf5340/src/nrf5340_ble_hci.c
+++ b/nimble/transport/nrf5340/src/nrf5340_ble_hci.c
@@ -272,10 +272,10 @@ nrf5340_ble_hci_trans_rx_process(int channel)
         rxd->expected_len = 0;
 
 #if MYNEWT_VAL(BLE_CONTROLLER)
-        assert((rxd->type == HCI_PKT_ACL) || (rxd->type = HCI_PKT_CMD));
+        assert((rxd->type == HCI_PKT_ACL) || (rxd->type == HCI_PKT_CMD));
 #endif
 #if MYNEWT_VAL(BLE_HOST)
-        assert((rxd->type == HCI_PKT_ACL) || (rxd->type = HCI_PKT_EVT));
+        assert((rxd->type == HCI_PKT_ACL) || (rxd->type == HCI_PKT_EVT));
 #endif
         break;
 #if MYNEWT_VAL(BLE_CONTROLLER)