]> git.ipfire.org Git - thirdparty/libvirt.git/commit
doRemoteOpen: Refactor control flow
authorPeter Krempa <pkrempa@redhat.com>
Wed, 18 May 2022 09:18:54 +0000 (11:18 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Wed, 18 May 2022 11:46:30 +0000 (13:46 +0200)
commitf7c422993e4c7ca3e58b1d0d69f4772851af399f
tree02ea23b41218c6876663686016b0bd829e65b1f8
parent7f50557c08498670c605710aebd0f013563bac8c
doRemoteOpen: Refactor control flow

Use a temporary variable 'newconn' to hold the newly opened connection
until we are ready to pass it back instead of the original connection.

This way we can avoid complicated 'error'/'cleanup' sections.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
src/remote/remote_daemon_dispatch.c