Re: PATCH 2/4: Xen driver support for serial/paralle

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 24, 2008 at 10:14:49PM +0100, Daniel P. Berrange wrote:
> On Thu, Apr 24, 2008 at 10:42:34PM +0200, Jim Meyering wrote:
> > All of the virBufferAddLit and virBufferVSprintf calls
> > above can fail with ENOMEM.  I see that there are *many* more
> > virBufferAddLit and virBufferVSprintf calls that ignore their
> > return values (over 300), so maybe I'm missing something.
> 
> Yes, the entire set of Xen drivers is basically fubar wrt to checking
> virBufferXXX return values. I felt that needed addresing independantly
> changing everything in one go, so didn't try to address that in this
> patch.

  Maybe the best is to store in the buffer the fact that there have been
an error at some point, and check that value before extracting the content
in a single place, that would make the code cleaner, and makes harder to
miss one test.

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

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]