[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [XENVIF PATCH] Fix signed comparison in Mrsw.h
Signed-off-by: Tu Dinh <ngoc-tu.dinh@xxxxxxxxxx> --- src/xenvkbd/mrsw.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/xenvkbd/mrsw.h b/src/xenvkbd/mrsw.h index 929415e..bddc49d 100644 --- a/src/xenvkbd/mrsw.h +++ b/src/xenvkbd/mrsw.h @@ -64,7 +64,7 @@ InitializeMrswLock( RtlZeroMemory(Lock, sizeof (XENVKBD_MRSW_LOCK)); - for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) + for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) Lock->Holder[Slot].Level = -1; KeInitializeEvent(&Lock->Event, NotificationEvent, FALSE); @@ -103,7 +103,7 @@ __AcquireMrswLockExclusive( Self = KeGetCurrentThread(); // Make sure we do not already hold the lock - for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) + for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) ASSERT(Lock->Holder[Slot].Thread != Self); for (;;) { @@ -218,7 +218,7 @@ AcquireMrswLockShared( // Do we already hold the lock? If so, get the nesting level Level = -1; - for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) { + for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) { if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level) Level = Lock->Holder[Slot].Level; } @@ -261,7 +261,7 @@ ReleaseMrswLockShared( Level = -1; Deepest = -1; - for (Slot = 0; Slot < sizeof (Lock->Mask) * 8; Slot++) { + for (Slot = 0; Slot < (LONG) sizeof (Lock->Mask) * 8; Slot++) { if (Lock->Holder[Slot].Thread == Self && Lock->Holder[Slot].Level > Level) { Level = Lock->Holder[Slot].Level; Deepest = Slot; -- 2.47.1.windows.1 Ngoc Tu Dinh | Vates XCP-ng Developer XCP-ng & Xen Orchestra - Vates solutions web: https://vates.tech
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |