Skip to content

Commit

Permalink
fixing comparison strcmp results to 0 if strings are the same
Browse files Browse the repository at this point in the history
Signed-off-by: Nikola Dancejic <ndancejic@microsoft.com>
  • Loading branch information
Ndancejic committed Sep 1, 2022
1 parent 6f50d83 commit 6f5235b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/muxorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -448,7 +448,7 @@ void MuxCable::setState(string new_state)
{
// Update HW Mux cable state anyways
mux_cb_orch_->updateMuxState(mux_name_, new_state);
if (strcmp(new_state.c_str(), muxStateValToString.at(state_).c_str()))
if (strcmp(new_state.c_str(), muxStateValToString.at(state_).c_str()) == 0)
{
SWSS_LOG_NOTICE("[%s] Maintaining current MUX state", mux_name_.c_str());
}
Expand Down

0 comments on commit 6f5235b

Please sign in to comment.