tests/context: fix Coverity warning about array overrun
Coverity was warning about an array overrun that should never happen. Add an extra check to verify that is indeed the case. Coverity issue 152017. Change-Id: Ie6269acaa85387ba051dbff87b4bfaab860517a6 Signed-off-by: Benjamin Walsh <benjamin.walsh@windriver.com>
This commit is contained in:
parent
876f751cde
commit
abaaf89d69
1 changed files with 6 additions and 0 deletions
|
@ -760,6 +760,12 @@ static int test_timeout(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (j == NUM_TIMEOUT_FIBERS) {
|
||||
TC_ERROR(" *** array overrun: all timeout order values should have been between the boundaries\n");
|
||||
return TC_FAIL;
|
||||
}
|
||||
|
||||
task_fiber_delayed_start_cancel(delayed_fibers[j]);
|
||||
++next_cancellation;
|
||||
continue;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue