Skip to content

Commit

Permalink
#51: Fix critical code smell found by SonarCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSomeMan committed Oct 25, 2022
1 parent 71c23c4 commit 52d2f5d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions src/app_uart.c
Original file line number Diff line number Diff line change
Expand Up @@ -431,17 +431,17 @@ rd_status_t app_uart_send_broadcast (const ri_adv_scan_t * const scan)
if (RE_SUCCESS == re_code)
{
uint16_t filter_id = RB_BLE_MANUFACTURER_ID;
bool flag_discard = false;

if (app_ble_manufacturer_filter_enabled (&filter_id))
if (app_ble_manufacturer_filter_enabled (&filter_id) &&
(manuf_id != filter_id))
{
if (manuf_id == filter_id)
{
err_code |= m_uart.send (&msg);
}
else
{
err_code |= RD_ERROR_INVALID_DATA;
}
flag_discard = true;
}

if (flag_discard)
{
err_code |= RD_ERROR_INVALID_DATA;
}
else
{
Expand Down

0 comments on commit 52d2f5d

Please sign in to comment.