From 6ce939c2472e8cd97dfe448e902bc878c826351e Mon Sep 17 00:00:00 2001 From: Jim Fehlig Date: Thu, 3 Sep 2015 10:14:20 -0600 Subject: [PATCH] libxl: don't overwrite error from virNetSocketNewConnectTCP() Remove redundant error reporting in libxlDomainMigrationPerform(). virNetSocketNewConnectTCP() is perfectly capable of reporting sensible errors. --- src/libxl/libxl_migration.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/libxl/libxl_migration.c b/src/libxl/libxl_migration.c index 9609e06850..0d23e5f704 100644 --- a/src/libxl/libxl_migration.c +++ b/src/libxl/libxl_migration.c @@ -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);