sched/arinc653: fix another unsigned < 0 comparison

replacing it with a test of the appopriate unsigned max.

Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
This commit is contained in:
Keir Fraser committed 2010-12-09 08:30:30 +00:00
1 parent 14b3ef3645
commit d94fb68299
1 file changed
+1 -1
+1 -1
View File
@@ -241,7 +241,7 @@ arinc653_sched_set(
found_dom0 = 1;
/* Check for a valid VCPU ID and run time. */
if ( (schedule->sched_entries[i].vcpu_id < 0)
if ( (schedule->sched_entries[i].vcpu_id >= MAX_VIRT_CPUS)
|| (schedule->sched_entries[i].runtime <= 0) )
goto fail;
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.