
21 Oct
2009
21 Oct
'09
5:24 p.m.
While reviewing Rich last patch I was afraid that virXPathNodeSet() could return -1 when doing an evaluation failure. It is based on xmlXPathEval() from libxml2 whose behaviour is to possibly return NULL on XPath evaluation failure independantly of the kind of failure: http://xmlsoft.org/html/libxml-xpath.html#xmlXPathEval I suggest to apply this patch to make sure we always return 0 unless the returned XPath type is of the wrong type (meaning the query passed didn't evaluate to a node set and code must be fixed) Daniel -- Daniel Veillard | libxml Gnome XML XSLT toolkit http://xmlsoft.org/ daniel@veillard.com | Rpmfind RPM search engine http://rpmfind.net/ http://veillard.com/ | virtualization library http://libvirt.org/