]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
doRemoteOpen: Drop needless typecast of @transport
authorMichal Privoznik <mprivozn@redhat.com>
Fri, 4 Apr 2025 09:46:36 +0000 (11:46 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Mon, 7 Apr 2025 06:43:03 +0000 (08:43 +0200)
The @transport variable is already pass into the function with
proper type. There's no need to typecast it to its very same type
inside the function.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
src/remote/remote_driver.c

index 3ecef7d73faa5eaaffc51804444a3d5d0d675d98..2690c05267f76cd98ee8317da6684be266d2512b 100644 (file)
@@ -1063,7 +1063,7 @@ doRemoteOpen(virConnectPtr conn,
 
     VIR_DEBUG("Connecting with transport %d", transport);
 
-    switch ((remoteDriverTransport)transport) {
+    switch (transport) {
     case REMOTE_DRIVER_TRANSPORT_UNIX:
     case REMOTE_DRIVER_TRANSPORT_SSH:
     case REMOTE_DRIVER_TRANSPORT_LIBSSH:
@@ -1088,7 +1088,7 @@ doRemoteOpen(virConnectPtr conn,
     VIR_DEBUG("Chosen UNIX socket %s", NULLSTR(sockname));
 
     /* Connect to the remote service. */
-    switch ((remoteDriverTransport)transport) {
+    switch (transport) {
     case REMOTE_DRIVER_TRANSPORT_TLS:
         if (conf && !tls_priority &&
             virConfGetValueString(conf, "tls_priority", &tls_priority) < 0)