Skip to content

Commit 0a92d8e

Browse files
authored
Merge pull request #573 from bratpiorka/rrudnick_coverity_fixes
Coverity fixes
2 parents 3baeae7 + 8f2776d commit 0a92d8e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/provider_os_memory_multiple_numa_nodes.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -558,15 +558,15 @@ TEST_P(testNumaSplit, checkModeSplit) {
558558
ASSERT_EQ(out.size(), pages)
559559
<< "Wrong test input - out array size doesn't match page count";
560560

561-
auto v = numa_nodes;
562561
// If input partitions are not defined then partitions are created based on numa_list order.
563562
// Do not shuffle them in this case, as this test require deterministic binds
564563
if (in.size() != 0) {
565564
std::mt19937 g(0);
566-
std::shuffle(v.begin(), v.begin() + required_numa_nodes, g);
565+
std::shuffle(numa_nodes.begin(),
566+
numa_nodes.begin() + required_numa_nodes, g);
567567
}
568568

569-
os_memory_provider_params.numa_list = v.data();
569+
os_memory_provider_params.numa_list = numa_nodes.data();
570570
os_memory_provider_params.numa_list_len = required_numa_nodes;
571571
os_memory_provider_params.numa_mode = UMF_NUMA_MODE_SPLIT;
572572

@@ -586,7 +586,7 @@ TEST_P(testNumaSplit, checkModeSplit) {
586586
memset(ptr, 0xFF, size);
587587
// Test where each page will be allocated.
588588
size_t index = 0;
589-
for (auto x : out) {
589+
for (const auto &x : out) {
590590
numa_bitmask_clearall(nodemask);
591591

592592
// Query the memory policy for the specific address

0 commit comments

Comments
 (0)