Skip to content

Commit

Permalink
[twamporch] Explicitly initialize local variable (#3115)
Browse files Browse the repository at this point in the history
What I did
Explicitly initialized local variable.

Why I did it
We met below error message in sonic-buildimage armhf build (sonic-net/sonic-buildimage#18334)
  • Loading branch information
huseratgithub authored Apr 16, 2024
1 parent 1941023 commit ec46395
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions orchagent/twamporch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,6 +690,7 @@ task_process_status TwampOrch::createEntry(const string& key, const vector<Field
if (entry.role == SAI_TWAMP_SESSION_ROLE_SENDER)
{
TwampStats hw_stats;
memset(&hw_stats, 0, sizeof(TwampStats));
m_twampStatistics.emplace(key, hw_stats);
initSessionStats(key);
}
Expand Down

0 comments on commit ec46395

Please sign in to comment.