
Dan Smith wrote:
KR> +static int parse_eo_array(CMPIArray *strings_in, KR> + CMPIArray **instances_out, KR> + const CMPIBroker *broker, KR> + const char *ns, KR> + CMPIStatus *s) KR> +{ KR> + int i; KR> + int ret; KR> + int count; KR> + KR> + if (CMIsNullObject(strings_in)) { KR> + CMSetStatus(s, CMPI_RC_ERR_INVALID_PARAMETER); KR> + CU_DEBUG("Method parameter is NULL"); KR> + return 0; KR> + } KR> + KR> + count = CMGetArrayCount(strings_in, NULL);
If you're not going to allocate the CMPIArray in here, then you don't need a double pointer for it :). I'd say either allocate it here, or change it to a single pointer.
I think in my previous example I had used a double-pointer to match the call and behavior of the single-instance case, since it allocates the instance at the next level up.
Either way is fine, but both require a change :)
Yes, you're right. That was careless of me. =) -- Kaitlin Rupert IBM Linux Technology Center kaitlin@linux.vnet.ibm.com