aboutsummaryrefslogtreecommitdiff
path: root/hw/net
diff options
context:
space:
mode:
Diffstat (limited to 'hw/net')
-rw-r--r--hw/net/virtio-net.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/hw/net/virtio-net.c b/hw/net/virtio-net.c
index 3c0342e17a..fd23c4627e 100644
--- a/hw/net/virtio-net.c
+++ b/hw/net/virtio-net.c
@@ -397,12 +397,15 @@ static int peer_detach(VirtIONet *n, int index)
static void virtio_net_set_queues(VirtIONet *n)
{
int i;
+ int r;
for (i = 0; i < n->max_queues; i++) {
if (i < n->curr_queues) {
- assert(!peer_attach(n, i));
+ r = peer_attach(n, i);
+ assert(!r);
} else {
- assert(!peer_detach(n, i));
+ r = peer_detach(n, i);
+ assert(!r);
}
}
}