[libvirt] [PATCH 1/2] xenapi_driver: fix copy-paste typo

Pavel Hrdina phrdina at redhat.com
Wed Jan 21 17:09:27 UTC 2015


Clang found that we are passing variable with wrong enum type to
'xenapiCrashExitEnum2virDomainLifecycle' function. This is probably
copy-paste typo as the correct variable exists in the code, but it isn't
used.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 src/xenapi/xenapi_driver.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/xenapi/xenapi_driver.c b/src/xenapi/xenapi_driver.c
index c5118ec..cef53ec 100644
--- a/src/xenapi/xenapi_driver.c
+++ b/src/xenapi/xenapi_driver.c
@@ -1504,7 +1504,7 @@ xenapiDomainGetXMLDesc(virDomainPtr dom, unsigned int flags)
         defPtr->onReboot = xenapiNormalExitEnum2virDomainLifecycle(action);
     enum xen_on_crash_behaviour crash;
     if (xen_vm_get_actions_after_crash(session, &crash, vm))
-        defPtr->onCrash = xenapiCrashExitEnum2virDomainLifecycle(action);
+        defPtr->onCrash = xenapiCrashExitEnum2virDomainLifecycle(crash);
     xen_vm_get_platform(session, &result, vm);
     if (result != NULL) {
         size_t i;
-- 
2.0.5




More information about the libvir-list mailing list