aboutsummaryrefslogtreecommitdiffstats
path: root/xen/arch/x86/physdev.c
diff options
context:
space:
mode:
authorKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
committerKeir Fraser <keir@xen.org>2010-10-29 18:05:50 +0100
commit5100a5ede1a200a2831f0b357fb474b853f8c83f (patch)
tree179b84e20f46a09cf19007e46e9cd850e5720618 /xen/arch/x86/physdev.c
parent9bbfbb147798c91c4f4c6f0b947ca62a7ae8b89a (diff)
downloadxen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.gz
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.tar.bz2
xen-5100a5ede1a200a2831f0b357fb474b853f8c83f.zip
Xen: fix various checks of unsigned integers < 0
Some of these could be benignly discarded by the compiler but some are actual bugs. Signed-off-by: Tim Deegan <Tim.Deegan@citrix.com>
Diffstat (limited to 'xen/arch/x86/physdev.c')
-rw-r--r--xen/arch/x86/physdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xen/arch/x86/physdev.c b/xen/arch/x86/physdev.c
index baaff24ba2..6a12f0013e 100644
--- a/xen/arch/x86/physdev.c
+++ b/xen/arch/x86/physdev.c
@@ -202,7 +202,7 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_HANDLE(void) arg)
if ( copy_from_guest(&eoi, arg, 1) != 0 )
break;
ret = -EINVAL;
- if ( eoi.irq < 0 || eoi.irq >= v->domain->nr_pirqs )
+ if ( eoi.irq >= v->domain->nr_pirqs )
break;
if ( v->domain->arch.pirq_eoi_map )
evtchn_unmask(v->domain->pirq_to_evtchn[eoi.irq]);