aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorThomas Huth <thuth@redhat.com>2023-10-04 10:49:39 +0200
committerMarkus Armbruster <armbru@redhat.com>2023-10-06 10:56:54 +0200
commit5d63cb15bf2667486117690de02bbb85c1a36942 (patch)
tree21c9b6c7dda7bab20bf6861b7d643917a045c536 /hw
parent071add900ba33cee8976dc3ae5b0d4909b1955f2 (diff)
hw/net/vhost_net: Silence compiler warning when compiling with -Wshadow
Rename the innermost local variables to avoid compiler warnings with "-Wshadow". Signed-off-by: Thomas Huth <thuth@redhat.com> Message-ID: <20231004084939.96349-1-thuth@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/net/vhost_net.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/hw/net/vhost_net.c b/hw/net/vhost_net.c
index 57427a3997..e8e1661646 100644
--- a/hw/net/vhost_net.c
+++ b/hw/net/vhost_net.c
@@ -313,8 +313,8 @@ fail:
/* Queue might not be ready for start */
continue;
}
- int r = vhost_net_set_backend(&net->dev, &file);
- assert(r >= 0);
+ int ret = vhost_net_set_backend(&net->dev, &file);
+ assert(ret >= 0);
}
}
if (net->nc->info->poll) {
@@ -629,8 +629,8 @@ err_start:
if (net->nc->info->type == NET_CLIENT_DRIVER_TAP) {
file.fd = VHOST_FILE_UNBIND;
file.index = idx;
- int r = vhost_net_set_backend(&net->dev, &file);
- assert(r >= 0);
+ int ret = vhost_net_set_backend(&net->dev, &file);
+ assert(ret >= 0);
}
vhost_dev_stop(&net->dev, vdev, false);