[libvirt] [PATCH v3 41/48] remote: refactor the code for choosing the UNIX socket path

Andrea Bolognani abologna at redhat.com
Tue Jul 30 15:59:47 UTC 2019


On Mon, 2019-07-29 at 18:11 +0100, Daniel P. Berrangé wrote:
> +++ b/src/remote/remote_driver.c
> @@ -976,6 +977,29 @@ doRemoteOpen(virConnectPtr conn,
> +    switch ((remoteDriverTransport)transport) {
> +    case REMOTE_DRIVER_TRANSPORT_UNIX:
> +    case REMOTE_DRIVER_TRANSPORT_SSH:
> +    case REMOTE_DRIVER_TRANSPORT_LIBSSH:
> +    case REMOTE_DRIVER_TRANSPORT_LIBSSH2:
> +        if (!sockname &&
> +            !(sockname = remoteGetUNIXSocket(transport, flags)))
> +            goto failed;

Curly brackets around the body.

Also you should have either a break statement (preferred) or an
ATTRIBUTE_FALLTHROUGH annotation here.

-- 
Andrea Bolognani / Red Hat / Virtualization




More information about the libvir-list mailing list