Skip to content

Commit

Permalink
[#287] Fix code smell found by SonarCloud
Browse files Browse the repository at this point in the history
  • Loading branch information
TheSomeMan committed Apr 16, 2024
1 parent af3575d commit ad434c6
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/wifi_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -274,12 +274,13 @@ wifi_manager_disable_wps(void)
void
wifi_manager_stop(void)
{
if (wifi_manager_is_initialized())
if (!wifi_manager_is_initialized())
{
if (!wifiman_msg_send_cmd_stop_and_destroy())
{
LOG_ERR("%s failed", "wifiman_msg_send_cmd_stop_and_destroy");
}
return;
}
if (!wifiman_msg_send_cmd_stop_and_destroy())
{
LOG_ERR("%s failed", "wifiman_msg_send_cmd_stop_and_destroy");
}
}

Expand Down

0 comments on commit ad434c6

Please sign in to comment.