[Libvirt-cim] [PATCH] Fix kvm support check logic

Eli Qiao(Li Yong Qiao) taget at linux.vnet.ibm.com
Thu Jun 27 07:07:47 UTC 2013


于 2013年06月27日 14:55, Xu Wang 写道:
> +static xmlNodePtr seek_subNode(xmlNodePtr node, char *tag)
> +{
> +        xmlNodePtr child = node->children;
> +        xmlNodePtr ret = NULL;
> +
> +        if (child == NULL) {
> +                return NULL;
> +        }
> +
> +        while (child) {
> +                if (XSTREQ(child->name, tag)) {
> +                        return child;
> +                }
> +
> +                ret = seek_subNode(child, tag);
> +                if (ret) {
> +                        return ret;
> +                }
> +
> +                child = child->next;
if (ret == NULL) and (child = (child->next ) ==NULL)

what would seek_subNode return ?
should return a NULL when quit from while loop.
> +        }
> +}



-- 
Thanks Eli.(Li Yong Qiao/qiaoly at cn.ibm.com Chinese Name:乔立勇)
LTC, Chian CSTL




More information about the Libvirt-cim mailing list