tests/kernel/common: Fix dead code in sflist test
An inverted comparison typo led to the final loop in the sflist being skipped. Fix so that it actually runs. (Odd that it took a static analysis tool to detect this, the loop expressions are all constants, I'm surprised gcc didn't see it while doing unrolling analysis). Fixes #18437 Signed-off-by: Andy Ross <andrew.j.ross@intel.com>
This commit is contained in:
parent
ca82230780
commit
8cdbd1cd0b
1 changed files with 1 additions and 1 deletions
|
@ -404,7 +404,7 @@ void test_sflist(void)
|
|||
sys_sfnode_flags_set(node, 3 - ii);
|
||||
sys_sflist_append(&test_list, node);
|
||||
}
|
||||
for (ii = 3; ii <= 0; ii--) {
|
||||
for (ii = 3; ii >= 0; ii--) {
|
||||
node = sys_sflist_get(&test_list);
|
||||
zassert_equal(sys_sfnode_flags_get(node), ii,
|
||||
"wrong flags value");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue