[Libvirt-cim] [PATCH 07 of 18] Fixes to VSMC for libcmpiutil API change

Dan Smith danms at us.ibm.com
Tue Nov 27 19:28:33 UTC 2007


# HG changeset patch
# User Dan Smith <danms at us.ibm.com>
# Date 1196195061 28800
# Node ID 393868c380f668d3d5e765f6503be3eb3eac0a62
# Parent  6e84b22c2d0251897d1f12a97fc79a0cfa2c0db9
Fixes to VSMC for libcmpiutil API change

Signed-off-by: Dan Smith <danms at us.ibm.com>

diff -r 6e84b22c2d02 -r 393868c380f6 src/Virt_VirtualSystemManagementCapabilities.c
--- a/src/Virt_VirtualSystemManagementCapabilities.c	Tue Nov 27 12:24:18 2007 -0800
+++ b/src/Virt_VirtualSystemManagementCapabilities.c	Tue Nov 27 12:24:21 2007 -0800
@@ -95,10 +95,9 @@ CMPIStatus get_vsm_cap(const CMPIBroker 
         CMPIStatus s;
         CMPIObjectPath *op;
         char *classname = NULL;
-        char *sys_name = NULL;
-        
-        sys_name = cu_get_str_path(ref, "Name");
-        if (sys_name == NULL) {
+        const char *sys_name = NULL;
+        
+        if (cu_get_str_path(ref, "Name", &sys_name) != CMPI_RC_OK) {
                 CMSetStatusWithChars(broker, &s,
                                      CMPI_RC_ERR_FAILED,
                                      "Missing key: Name");
@@ -134,7 +133,6 @@ CMPIStatus get_vsm_cap(const CMPIBroker 
 
  out:
         free(classname);
-        free(sys_name);
 
         return s;
 }




More information about the Libvirt-cim mailing list