On Tue, Nov 27, 2007 at 01:19:48PM +0000, Richard W.M. Jones wrote: > Morning Saori, > > You need to call the error function for each error condition, eg: > > if (mapstr == NULL) { > xenXMError (domain ? domain->conn : NULL, VIR_ERR_NO_MEMORY, > __FUNCTION__); > return -1; > } > > (Much of the current libvirt code gets this wrong, and it's a great deal > of pain caused by virterror, but there's no sensible way to change > things from here.) > > The inner loop is still quadratic even with snprintf because you're > copying the string each time. I've changed it below to use a virBuffer > instead. > > If you ./configure --enable-compile-warnings=error then any warnings > will turn into errors. There was one warning in the patch you sent. > > Modified version of the patch is attached. **NOTE** I've only compiled > it, because I don't have any suitable machine to test it on. That patch looks good to me. Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ veillard@xxxxxxxxxx | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ -- Libvir-list mailing list Libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list