diff -c -b -r1.41 libvirt.c *** src/libvirt.c 9 Aug 2006 15:21:16 -0000 1.41 --- src/libvirt.c 9 Aug 2006 22:58:47 -0000 *************** *** 720,726 **** int virDomainDestroy(virDomainPtr domain) { ! int ret = -1, i; virConnectPtr conn; if (!VIR_IS_CONNECTED_DOMAIN(domain)) { --- 720,726 ---- int virDomainDestroy(virDomainPtr domain) { ! int i; virConnectPtr conn; if (!VIR_IS_CONNECTED_DOMAIN(domain)) { *************** *** 743,749 **** (conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainDestroy != NULL)) { if (conn->drivers[i]->domainDestroy(domain) == 0) ! ret = 0; } } for (i = 0;i < conn->nb_drivers;i++) { --- 743,749 ---- (conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainDestroy != NULL)) { if (conn->drivers[i]->domainDestroy(domain) == 0) ! return (0); } } for (i = 0;i < conn->nb_drivers;i++) { *************** *** 751,766 **** (conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainDestroy != NULL)) { if (conn->drivers[i]->domainDestroy(domain) == 0) ! ret = 0; } } - if (ret != 0) { virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__); ! return (ret); ! } ! ! return (ret); } /** --- 751,762 ---- (conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainDestroy != NULL)) { if (conn->drivers[i]->domainDestroy(domain) == 0) ! return (0); } } virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__); ! return (-1); } /** *************** *** 799,805 **** int virDomainSuspend(virDomainPtr domain) { ! int ret = -1, i; virConnectPtr conn; if (!VIR_IS_CONNECTED_DOMAIN(domain)) { --- 795,801 ---- int virDomainSuspend(virDomainPtr domain) { ! int i; virConnectPtr conn; if (!VIR_IS_CONNECTED_DOMAIN(domain)) { *************** *** 822,828 **** (conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainSuspend != NULL)) { if (conn->drivers[i]->domainSuspend(domain) == 0) ! ret = 0; } } for (i = 0;i < conn->nb_drivers;i++) { --- 818,824 ---- (conn->drivers[i]->no != VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainSuspend != NULL)) { if (conn->drivers[i]->domainSuspend(domain) == 0) ! return (0); } } for (i = 0;i < conn->nb_drivers;i++) { *************** *** 830,845 **** (conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainSuspend != NULL)) { if (conn->drivers[i]->domainSuspend(domain) == 0) ! ret = 0; } } - if (ret != 0) { virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__); ! return (ret); ! } ! ! return (ret); } /** --- 826,837 ---- (conn->drivers[i]->no == VIR_DRV_XEN_HYPERVISOR) && (conn->drivers[i]->domainSuspend != NULL)) { if (conn->drivers[i]->domainSuspend(domain) == 0) ! return (0); } } virLibConnError(conn, VIR_ERR_CALL_FAILED, __FUNCTION__); ! return (-1); } /**