mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-18 05:28:36 -07:00
virtio: Drop superfluous conditionals around g_strdup()
Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com>
This commit is contained in:
parent
9e28840658
commit
80e0090a44
2 changed files with 2 additions and 11 deletions
|
|
@ -1165,11 +1165,7 @@ EventNotifier *virtio_queue_get_host_notifier(VirtQueue *vq)
|
|||
void virtio_device_set_child_bus_name(VirtIODevice *vdev, char *bus_name)
|
||||
{
|
||||
g_free(vdev->bus_name);
|
||||
vdev->bus_name = NULL;
|
||||
|
||||
if (bus_name) {
|
||||
vdev->bus_name = g_strdup(bus_name);
|
||||
}
|
||||
vdev->bus_name = g_strdup(bus_name);
|
||||
}
|
||||
|
||||
static void virtio_device_realize(DeviceState *dev, Error **errp)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue