[Libvirt-cim] [PATCH] [RFC] variable renaming in make_ref() of associations

Heidi Eckhart heidieck at linux.vnet.ibm.com
Wed Dec 5 10:57:59 UTC 2007


# HG changeset patch
# User Heidi Eckhart <heidieck at linux.vnet.ibm.com>
# Date 1196855770 -3600
# Node ID b49cfc1c6e9c3e4669bceea2f518f6c4f8bf3f82
# Parent  012fc8655c2b443511ba536ef2b425ac86f69f7b
[RFC] variable renaming in make_ref() of associations

Suggestion to rename some of the variables in make_ref()
to make the relations clearer.
Signed-off-by: Heidi Eckhart <heidieck at linux.vnet.ibm.com>

diff -r 012fc8655c2b -r b49cfc1c6e9c src/Virt_ElementAllocatedFromPool.c
--- a/src/Virt_ElementAllocatedFromPool.c	Wed Dec 05 12:49:18 2007 +0100
+++ b/src/Virt_ElementAllocatedFromPool.c	Wed Dec 05 12:56:10 2007 +0100
@@ -247,27 +247,27 @@ static CMPIStatus pool_to_vdev(const CMP
         return s;
 }
 
-static CMPIInstance *make_ref(const CMPIObjectPath *ref,
-                              const CMPIInstance *inst,
+static CMPIInstance *make_ref(const CMPIObjectPath *source_ref,
+                              const CMPIInstance *target_inst,
                               struct std_assoc_info *info,
                               struct std_assoc *assoc)
 {
-        CMPIInstance *refinst = NULL;
-
-        refinst = get_typed_instance(_BROKER,
-                                     CLASSNAME(ref),
-                                     "ElementAllocatedFromPool",
-                                     NAMESPACE(ref));
-
-        if (refinst != NULL) {
-                CMPIObjectPath *instop;
-
-                instop = CMGetObjectPath(inst, NULL);
-
-                set_reference(assoc, refinst, ref, instop);
-        }
-
-        return refinst;
+        CMPIInstance *ref_inst = NULL;
+
+        ref_inst = get_typed_instance(_BROKER,
+                                      CLASSNAME(source_ref),
+                                      "ElementAllocatedFromPool",
+                                      NAMESPACE(source_ref));
+
+        if (ref_inst != NULL) {
+                CMPIObjectPath *target_ref;
+
+                target_ref = CMGetObjectPath(target_inst, NULL);
+
+                set_reference(assoc, ref_inst, source_ref, target_ref);
+        }
+
+        return ref_inst;
 }
 
 char* antecedent[] = {




More information about the Libvirt-cim mailing list