Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12:Update
libvirt.401
92cd6b67-libxl-label-rename.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 92cd6b67-libxl-label-rename.patch of Package libvirt.401
commit 92cd6b677e121463df414ebe42b847eacf333e08 Author: Jim Fehlig <jfehlig@suse.com> Date: Tue Jul 8 10:59:39 2014 -0600 libxl: rename goto label In libxlDomainMigrationPrepare(), the cleanup label handles error conditions and should be renamed as such for clarity. Index: libvirt-1.2.5/src/libxl/libxl_migration.c =================================================================== --- libvirt-1.2.5.orig/src/libxl/libxl_migration.c +++ libvirt-1.2.5/src/libxl/libxl_migration.c @@ -289,31 +289,31 @@ libxlDomainMigrationPrepare(virConnectPt VIR_DOMAIN_OBJ_LIST_ADD_LIVE | VIR_DOMAIN_OBJ_LIST_ADD_CHECK_LIVE, NULL))) - goto cleanup; + goto error; /* Create socket connection to receive migration data */ if (!uri_in) { if ((hostname = virGetHostname()) == NULL) - goto cleanup; + goto error; if (STRPREFIX(hostname, "localhost")) { virReportError(VIR_ERR_INTERNAL_ERROR, "%s", _("hostname on destination resolved to localhost," " but migration requires an FQDN")); - goto cleanup; + goto error; } if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0) - goto cleanup; + goto error; if (virAsprintf(uri_out, "tcp://%s:%d", hostname, port) < 0) - goto cleanup; + goto error; } else { if (!(STRPREFIX(uri_in, "tcp://"))) { /* not full URI, add prefix tcp:// */ char *tmp; if (virAsprintf(&tmp, "tcp://%s", uri_in) < 0) - goto cleanup; + goto error; uri = virURIParse(tmp); VIR_FREE(tmp); } else { @@ -324,28 +324,28 @@ libxlDomainMigrationPrepare(virConnectPt virReportError(VIR_ERR_INVALID_ARG, _("unable to parse URI: %s"), uri_in); - goto cleanup; + goto error; } if (uri->server == NULL) { virReportError(VIR_ERR_INVALID_ARG, _("missing host in migration URI: %s"), uri_in); - goto cleanup; + goto error; } else { hostname = uri->server; } if (uri->port == 0) { if (virPortAllocatorAcquire(driver->migrationPorts, &port) < 0) - goto cleanup; + goto error; } else { port = uri->port; } if (virAsprintf(uri_out, "tcp://%s:%d", hostname, port) < 0) - goto cleanup; + goto error; } snprintf(portstr, sizeof(portstr), "%d", port); @@ -353,14 +353,14 @@ libxlDomainMigrationPrepare(virConnectPt if (virNetSocketNewListenTCP(hostname, portstr, &socks, &nsocks) < 0) { virReportError(VIR_ERR_OPERATION_FAILED, "%s", _("Fail to create socket for incoming migration")); - goto cleanup; + goto error; } if (libxlMigrationDstArgsInitialize() < 0) - goto cleanup; + goto error; if (!(args = virObjectNew(libxlMigrationDstArgsClass))) - goto cleanup; + goto error; args->conn = dconn; args->vm = vm; @@ -396,12 +396,12 @@ libxlDomainMigrationPrepare(virConnectPt virObjectUnref(args); if (!nsocks_listen) - goto cleanup; + goto error; ret = 0; goto done; - cleanup: + error: for (i = 0; i < nsocks; i++) { virNetSocketClose(socks[i]); virObjectUnref(socks[i]);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor