mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-29 05:13:54 -06: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
|
@ -1510,13 +1510,8 @@ void virtio_net_set_netclient_name(VirtIONet *n, const char *name,
|
|||
assert(type != NULL);
|
||||
|
||||
g_free(n->netclient_name);
|
||||
n->netclient_name = NULL;
|
||||
g_free(n->netclient_type);
|
||||
n->netclient_type = NULL;
|
||||
|
||||
if (name != NULL) {
|
||||
n->netclient_name = g_strdup(name);
|
||||
}
|
||||
n->netclient_name = g_strdup(name);
|
||||
n->netclient_type = g_strdup(type);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue