# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1194492744 28800
# Node ID af241b38b17ee4b3f2c2ee94f41aafd3023240d7
# Parent 92ed39296eb881deddc2d34fa9ee0524aefc1a53
Fix some really horrible cruft in ComputerSystem
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 92ed39296eb8 -r af241b38b17e src/Virt_ComputerSystem.c
--- a/src/Virt_ComputerSystem.c Wed Nov 07 09:01:06 2007 -0800
+++ b/src/Virt_ComputerSystem.c Wed Nov 07 19:32:24 2007 -0800
@@ -376,7 +376,7 @@ static CMPIStatus get_domain(const CMPIO
const CMPIResult *results,
char *name)
{
- CMPIInstance *inst[2] = {NULL, NULL};
+ CMPIInstance *inst;
CMPIStatus s;
virConnectPtr conn = NULL;
const char *prop = NULL;
@@ -385,15 +385,15 @@ static CMPIStatus get_domain(const CMPIO
if (conn == NULL)
return s;
- inst[0] = instance_from_name(_BROKER, conn, name, reference);
- if (inst[0] == NULL) {
+ inst = instance_from_name(_BROKER, conn, name, reference);
+ if (inst == NULL) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_FAILED,
"Unable to find `%s'", name);
goto out;
}
- prop = cu_compare_ref(reference, inst[0]);
+ prop = cu_compare_ref(reference, inst);
if (prop != NULL) {
cu_statusf(_BROKER, &s,
CMPI_RC_ERR_NOT_FOUND,
@@ -401,10 +401,8 @@ static CMPIStatus get_domain(const CMPIO
goto out;
}
- cu_return_instances(results, inst);
-
+ CMReturnInstance(results, inst);
CMSetStatus(&s, CMPI_RC_OK);
-
out:
virConnectClose(conn);
Show replies by date
Dan Smith wrote:
# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1194492744 28800
# Node ID af241b38b17ee4b3f2c2ee94f41aafd3023240d7
# Parent 92ed39296eb881deddc2d34fa9ee0524aefc1a53
Fix some really horrible cruft in ComputerSystem
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
Much cleaner. =) +1
--
Kaitlin Rupert
IBM Linux Technology Center
karupert(a)us.ibm.com