From af4286ed6b422f54c9cddd2dc982a1484a3bb7f8 Mon Sep 17 00:00:00 2001 From: Damian Krolik Date: Mon, 7 Oct 2024 15:01:56 +0200 Subject: [PATCH] bluetooth: rpc: fix assert condition The __ASSERT() instruction used assignment instead of comparison operator, causing a failure when receiving a Write Request/Write Command. Signed-off-by: Damian Krolik --- subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c b/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c index fb81eb4f9c55..e24c5d464c1d 100644 --- a/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c +++ b/subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c @@ -98,7 +98,7 @@ void bt_rpc_encode_gatt_attr(struct nrf_rpc_cbor_ctx *encoder, const struct bt_g int err; err = bt_rpc_gatt_attr_to_index(attr, &attr_index); - __ASSERT(err = 0, "Service attribute not found. Service database might be out of sync"); + __ASSERT(err == 0, "Service attribute not found. Service database might be out of sync"); nrf_rpc_encode_uint(encoder, attr_index); }