Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
Signed-off-by: Stephen Sun <[email protected]>
  • Loading branch information
stephenxs committed Feb 14, 2025
1 parent ad06ae8 commit 11034f3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion syncd/FlexCounterManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ void FlexCounterManager::bulkAddCounter(
SWSS_LOG_ENTER();

auto fc = getInstance(instanceId);
sai_object_type_t objectType = VidManager::objectTypeQuery(vids[0]); // VID and RID will have the same object type

sai_object_type_t objectType = VidManager::objectTypeQuery(vids.at(0)); // VID and RID will have the same object type

fc->bulkAddCounter(objectType, vids, rids, values);

Expand Down
2 changes: 1 addition & 1 deletion syncd/Syncd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2794,7 +2794,7 @@ sai_status_t Syncd::processFlexCounterEvent(
auto strVids = key.substr(delimiter + 1);
auto vidStringVector = swss::tokenize(strVids, ',');

if (fromAsicChannel && op == SET_COMMAND && vidStringVector.size() > 1)
if (fromAsicChannel && op == SET_COMMAND && (!vidStringVector.empty()))
{
std::vector<sai_object_id_t> vids;
std::vector<sai_object_id_t> rids;
Expand Down

0 comments on commit 11034f3

Please sign in to comment.