Skip to content

Commit

Permalink
[policerorch]: Fix return code comparison error (sonic-net#968)
Browse files Browse the repository at this point in the history
Throw error when the return code is NOT successful :(

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
stcheng authored Jul 3, 2019
1 parent bd3651f commit 115eca8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/policerorch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ void PolicerOrch::doTask(Consumer &consumer)

sai_status_t status = sai_policer_api->remove_policer(
m_syncdPolicers.at(key));
if (status == SAI_STATUS_SUCCESS)
if (status != SAI_STATUS_SUCCESS)
{
SWSS_LOG_ERROR("Failed to remove policer %s, rv:%d",
key.c_str(), status);
Expand Down

0 comments on commit 115eca8

Please sign in to comment.