[Libvirt-cim] [PATCH] Enable localhost migration

Dan Smith danms at us.ibm.com
Fri Apr 18 13:53:28 UTC 2008


KR> -        if (domain_exists(job->conn, job->domain)) {
KR> -                CU_DEBUG("Remote domain `%s' exists", job->domain);
KR> -                cu_statusf(_BROKER, &s,
KR> -                           CMPI_RC_ERR_FAILED,
KR> -                           "Remote already has domain `%s'", job->domain);
KR> -                goto out;
KR> +        if (!STREQ(job->host, "localhost")) {
KR> +                if (domain_exists(job->conn, job->domain)) {

This is a minor thing, but can't these two conditions be joined with
&& to avoid increasing the nesting level unnecessarily?

KR> +                        CU_DEBUG("Remote domain `%s' exists", job->domain);
KR> +                        cu_statusf(_BROKER, &s,
KR> +                                   CMPI_RC_ERR_FAILED,
KR> +                                   "Remote already has domain `%s'", 
KR> +                                   job->domain);
KR> +                        goto out;
KR> +                }
KR>          }

-- 
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20080418/e5a8d753/attachment.sig>


More information about the Libvirt-cim mailing list