diff --git a/src/systemcmds/tests/test_IntrusiveQueue.cpp b/src/systemcmds/tests/test_IntrusiveQueue.cpp index ff04f126eb..0c5d1fc24f 100644 --- a/src/systemcmds/tests/test_IntrusiveQueue.cpp +++ b/src/systemcmds/tests/test_IntrusiveQueue.cpp @@ -243,7 +243,7 @@ bool IntrusiveQueueTest::test_remove() for (auto t : q1) { if (t->i == remove_i) { ut_assert_true(q1.remove(t)); - t = removed; + removed = t; } } diff --git a/src/systemcmds/tests/test_List.cpp b/src/systemcmds/tests/test_List.cpp index c784aa4bd0..23329fe028 100644 --- a/src/systemcmds/tests/test_List.cpp +++ b/src/systemcmds/tests/test_List.cpp @@ -136,7 +136,7 @@ bool ListTest::test_remove() for (auto t : list1) { if (t->i == remove_i) { ut_assert_true(list1.remove(t)); - t = removed; + removed = t; } }