Skip to content

Commit

Permalink
bluetooth: rpc: fix assert condition
Browse files Browse the repository at this point in the history
The __ASSERT() instruction used assignment instead of
comparison operator, causing a failure when receiving
a Write Request/Write Command.

Signed-off-by: Damian Krolik <[email protected]>
  • Loading branch information
Damian-Nordic authored and rlubos committed Oct 9, 2024
1 parent 399bb73 commit af4286e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion subsys/bluetooth/rpc/host/bt_rpc_gatt_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit af4286e

Please sign in to comment.