[Libvirt-cim] [PATCH] Enhance handling of input parameter of std_association logic
Dan Smith
danms at us.ibm.com
Tue Nov 27 15:36:09 UTC 2007
HE> std_assoc_get_handler(const struct std_assoc_ctx *ctx,
HE> + struct std_assoc_info *info,
HE> const CMPIObjectPath *ref)
HE> {
HE> struct std_assoc *ptr = NULL;
HE> int i;
HE> + bool rc;
HE> +
HE> + CU_DEBUG("Calling Provider: '%s'",
HE> + info->provider_name);
HE> for (i = 0; ctx->handlers[i]; i++) {
HE> ptr = ctx->handlers[i];
HE> if (match_source_class(ctx->brkr, ref, ptr))
HE> - return ptr;
HE> - }
HE> -
HE> + break;
HE> + }
HE> +
HE> + if (ptr) {
This starts a large block of indented code that doesn't need to be.
Can we replace this with:
if (ptr == NULL)
goto out;
so that the rest of the body can just continue?
Otherwise, this seems fine, but I think it would be a good idea to get
a sign-off from Kaitlin as she is familiar with this stuff too.
--
Dan Smith
IBM Linux Technology Center
Open Hypervisor Team
email: danms at us.ibm.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 188 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvirt-cim/attachments/20071127/cf9be1c0/attachment.sig>
More information about the Libvirt-cim
mailing list