[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] virtio: Fix return value for dummy function vhost_n
From: |
Stefan Weil |
Subject: |
[Qemu-devel] [PATCH] virtio: Fix return value for dummy function vhost_net_virtqueue_pending |
Date: |
Sun, 22 Dec 2013 15:51:22 +0100 |
cgcc complains that -ENOSYS is not a good value for 'bool'.
A dummy virtio will never have pending queue entries, so let us return
false.
Signed-off-by: Stefan Weil <address@hidden>
---
Could we also use g_assert_not_reached or hw_error in those dummy functions?
Regards
Stefan
hw/net/vhost_net.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 006576d..854997d 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -321,7 +321,7 @@ void vhost_net_ack_features(struct vhost_net *net, unsigned
features)
bool vhost_net_virtqueue_pending(VHostNetState *net, int idx)
{
- return -ENOSYS;
+ return false;
}
void vhost_net_virtqueue_mask(VHostNetState *net, VirtIODevice *dev,
--
1.7.10.4
- [Qemu-devel] [PATCH] virtio: Fix return value for dummy function vhost_net_virtqueue_pending,
Stefan Weil <=