qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH v2 18/45] ivshmem: add a warning if eventfd value is


From: Marc-André Lureau
Subject: [Qemu-devel] [PATCH v2 18/45] ivshmem: add a warning if eventfd value is 0
Date: Tue, 28 Jul 2015 02:32:30 +0200

From: Marc-André Lureau <address@hidden>

This should not happen according to eventfd(2).

Signed-off-by: Marc-André Lureau <address@hidden>
---
 hw/misc/ivshmem.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/misc/ivshmem.c b/hw/misc/ivshmem.c
index 17dc122..6f3d2fe 100644
--- a/hw/misc/ivshmem.c
+++ b/hw/misc/ivshmem.c
@@ -267,6 +267,7 @@ static void ivshmem_receive(void *opaque, const uint8_t 
*buf, int size)
     IVShmemState *s = opaque;
 
     IVSHMEM_DPRINTF("ivshmem_receive 0x%02x size: %d\n", *buf, size);
+    g_warn_if_fail(*buf != 0);
 
     ivshmem_IntrStatus_write(s, *buf);
 }
-- 
2.4.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]