Skip to contentSkip to conversation

sched/arinc653: fix another unsigned < 0 comparison

PATCH New Tim Deegan 1 participant 1 message Dec 8, 2010

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 sched/arinc653: fix another unsigned < 0 comparison

sched/arinc653: fix another unsigned < 0 comparison replacing it with a test of the appopriate unsigned max.

xen/common/sched_arinc653.c +1 -1
diff -r 89116f28083f -r a107be26c1fc xen/common/sched_arinc653.c
@@ -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;