+
+static CMPIStatus add_devices_to_list(const CMPIObjectPath *ref,
+ const char *host,
+ int type,
+ struct inst_list *list)
+{
+ CMPIStatus s = {CMPI_RC_OK, NULL};
+
+ s = enum_devices(_BROKER, ref, host, type, list);
+
+ if (s.rc != CMPI_RC_OK)
+ goto out;
There's not need to check the status here, since you just return
immediately after.
This reduces the function enough, that you can probably do without
creating an additional function here.
+
+ out:
+ return s;
+}
static CMPIStatus service_to_cs(const CMPIObjectPath *ref,
struct std_assoc_info *info,
@@ -41,15 +59,60 @@
{
CMPIStatus s = {CMPI_RC_OK, NULL};
CMPIInstance *instance = NULL;
+
+ // For each domain, insert its video and pointer devices into
+ // the list
For multi-line comments, most of the code uses /* */
--
Kaitlin Rupert
IBM Linux Technology Center
kaitlin(a)linux.vnet.ibm.com