mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-06 17:23:56 -06:00
Clean up some calls to ignore Error objects the right way
Receiving the error in a local variable only to free it is less clear (and also less efficient) than passing NULL. Clean up. Cc: Daniel P. Berrange <berrange@redhat.com> Cc: Jerome Forissier <jerome@forissier.org> CC: Greg Kurz <groug@kaod.org> Signed-off-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <20200630090351.1247703-4-armbru@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
This commit is contained in:
parent
5a79d10c95
commit
9261ef5e32
5 changed files with 7 additions and 16 deletions
3
ui/vnc.c
3
ui/vnc.c
|
@ -458,9 +458,8 @@ static VncServerInfo2List *qmp_query_server_entry(QIOChannelSocket *ioc,
|
|||
Error *err = NULL;
|
||||
SocketAddress *addr;
|
||||
|
||||
addr = qio_channel_socket_get_local_address(ioc, &err);
|
||||
addr = qio_channel_socket_get_local_address(ioc, NULL);
|
||||
if (!addr) {
|
||||
error_free(err);
|
||||
return prev;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue