Skip to content

Commit

Permalink
[orch] Fix the logic of judging malformed reference (sonic-net#1415)
Browse files Browse the repository at this point in the history
  • Loading branch information
tengfei-astfs authored Sep 9, 2020
1 parent 842f126 commit c38abc2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion orchagent/orch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ bool Orch::parseReference(type_map &type_maps, string &ref_in, string &type_name
SWSS_LOG_ERROR("invalid reference received:%s\n", ref_in.c_str());
return false;
}
if ((ref_in[0] != ref_start) && (ref_in[ref_in.size()-1] != ref_end))
if ((ref_in[0] != ref_start) || (ref_in[ref_in.size()-1] != ref_end))
{
SWSS_LOG_ERROR("malformed reference:%s. Must be surrounded by [ ]\n", ref_in.c_str());
return false;
Expand Down

0 comments on commit c38abc2

Please sign in to comment.