]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
libxl: don't overwrite error from virNetSocketNewConnectTCP()
authorJim Fehlig <jfehlig@suse.com>
Thu, 3 Sep 2015 16:14:20 +0000 (10:14 -0600)
committerJim Fehlig <jfehlig@suse.com>
Fri, 4 Sep 2015 02:37:28 +0000 (20:37 -0600)
Remove redundant error reporting in libxlDomainMigrationPerform().
virNetSocketNewConnectTCP() is perfectly capable of reporting
sensible errors.

src/libxl/libxl_migration.c

index 9609e06850f5568e02378c17738cc6a2545d25be..0d23e5f70449e1c3aa2d5e7c9ad7d513592b4513 100644 (file)
@@ -472,7 +472,6 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
     virURIPtr uri = NULL;
     virNetSocketPtr sock;
     int sockfd = -1;
-    int saved_errno = EINVAL;
     int ret = -1;
 
     /* parse dst host:port from uri */
@@ -487,12 +486,8 @@ libxlDomainMigrationPerform(libxlDriverPrivatePtr driver,
     /* socket connect to dst host:port */
     if (virNetSocketNewConnectTCP(hostname, portstr,
                                   AF_UNSPEC,
-                                  &sock) < 0) {
-        virReportSystemError(saved_errno,
-                             _("unable to connect to '%s:%s'"),
-                             hostname, portstr);
+                                  &sock) < 0)
         goto cleanup;
-    }
 
     if (virNetSocketSetBlocking(sock, true) < 0) {
         virObjectUnref(sock);