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

xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 21d2cc741f wireless/bluetooth: correct judgment conditions
21d2cc741f is described below

commit 21d2cc741ff6ed4a659a4c5f8aba97b481b1e6d2
Author: chao an <[email protected]>
AuthorDate: Mon Aug 7 16:06:58 2023 +0800

    wireless/bluetooth: correct judgment conditions
    
    Signed-off-by: chao an <[email protected]>
---
 wireless/bluetooth/bt_gatt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/wireless/bluetooth/bt_gatt.c b/wireless/bluetooth/bt_gatt.c
index 684e74c3fa..ae8a76cbb8 100644
--- a/wireless/bluetooth/bt_gatt.c
+++ b/wireless/bluetooth/bt_gatt.c
@@ -1220,7 +1220,7 @@ int bt_gatt_read_multiple(FAR struct bt_conn_s *conn,
   FAR struct bt_buf_s *buf;
   uint8_t i;
 
-  if (!conn && conn->state != BT_CONN_CONNECTED)
+  if (!conn || conn->state != BT_CONN_CONNECTED)
     {
       return -ENOTCONN;
     }

Reply via email to