Skip to content

Commit 115eca8

Browse files
authored
[policerorch]: Fix return code comparison error (sonic-net#968)
Throw error when the return code is NOT successful :( Signed-off-by: Shu0T1an ChenG <[email protected]>
1 parent bd3651f commit 115eca8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

orchagent/policerorch.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ void PolicerOrch::doTask(Consumer &consumer)
251251

252252
sai_status_t status = sai_policer_api->remove_policer(
253253
m_syncdPolicers.at(key));
254-
if (status == SAI_STATUS_SUCCESS)
254+
if (status != SAI_STATUS_SUCCESS)
255255
{
256256
SWSS_LOG_ERROR("Failed to remove policer %s, rv:%d",
257257
key.c_str(), status);

0 commit comments

Comments
 (0)