]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
remote: simplify condition
authorJán Tomko <jtomko@redhat.com>
Thu, 8 Mar 2018 16:34:56 +0000 (17:34 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 8 Mar 2018 16:40:57 +0000 (17:40 +0100)
In remoteConnectOpen, conn->uri cannot be NULL in the second
part of the OR expression due to short-circuit evaluation.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
src/remote/remote_driver.c

index 9ea726dc45c0a570251dc03a8b04d7a00cfc489a..93cba5daa3e8c543418b1f373f8a70df4a1181d8 100644 (file)
@@ -1310,7 +1310,7 @@ remoteConnectOpen(virConnectPtr conn,
     int ret, rflags = 0;
     const char *autostart = virGetEnvBlockSUID("LIBVIRT_AUTOSTART");
 
-    if (inside_daemon && (!conn->uri || (conn->uri && !conn->uri->server)))
+    if (inside_daemon && (!conn->uri || !conn->uri->server))
         return VIR_DRV_OPEN_DECLINED;
 
     if (!(priv = remoteAllocPrivateData()))