Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .azure-pipelines/build-docker-sonic-vs-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
timeoutInMinutes: ${{ parameters.timeout }}

pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

steps:
- checkout: self
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/build-sairedis-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
${{ if ne(parameters.pool, 'default') }}:
name: ${{ parameters.pool }}
${{ else }}:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/build-swss-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
${{ if ne(parameters.pool, 'default') }}:
name: ${{ parameters.pool }}
${{ else }}:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}
Expand Down
2 changes: 1 addition & 1 deletion .azure-pipelines/build-template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
${{ if ne(parameters.pool, 'default') }}:
name: ${{ parameters.pool }}
${{ else }}:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

container:
image: sonicdev-microsoft.azurecr.io:443/${{ parameters.sonic_slave }}
Expand Down
4 changes: 2 additions & 2 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ stages:

jobs:
- job:
displayName: "amd64/ubuntu-20.04"
displayName: "amd64/ubuntu-22.04"
pool:
vmImage: 'ubuntu-20.04'
vmImage: 'ubuntu-22.04'

steps:
- script: |
Expand Down
6 changes: 3 additions & 3 deletions common/events.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -365,7 +365,7 @@ EventSubscriber::init(bool use_cache, int recv_timeout,
RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc);
}
else {
for (const auto e: *subs_sources) {
for (const auto& e: *subs_sources) {
rc = zmq_setsockopt(sock, ZMQ_SUBSCRIBE, e.c_str(), e.size());
RET_ON_ERR(rc == 0, "Fails to set option rc=%d", rc);
}
Expand Down Expand Up @@ -400,14 +400,14 @@ EventSubscriber::prune_track()
map<time_t, vector<runtime_id_t> > lst;

/* Sort entries by last touched time */
for(const auto e: m_track) {
for(const auto& e: m_track) {
lst[e.second.epoch_secs].push_back(e.first);
}

/* By default it walks from lowest value / earliest timestamp */
map<time_t, vector<runtime_id_t> >::const_iterator itc = lst.begin();
for(; (itc != lst.end()) && (m_track.size() > MAX_PUBLISHERS_COUNT); ++itc) {
for (const auto r: itc->second) {
for (const auto& r: itc->second) {
m_track.erase(r);
}
}
Expand Down
2 changes: 1 addition & 1 deletion tests/events_ut.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ parse_read_evt(string &source, internal_event_t &evt,
EXPECT_FALSE(source.empty());
EXPECT_EQ(4, evt.size());

for (const auto e: evt) {
for (const auto& e: evt) {
if (e.first == EVENT_STR_DATA) {
EXPECT_EQ(0, convert_from_json(e.second, key, params));
// cout << "EVENT_STR_DATA: " << e.second << "\n";
Expand Down
Loading