Re: [PATCH 1/2] virCommand: document behavior on no output

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

 



On Sun, Dec 05, 2010 at 12:55:51AM +0100, Matthias Bolte wrote:
> 2010/12/4 Justin Clift <jclift@xxxxxxxxxx>:
> > On 04/12/2010, at 8:28 AM, Eric Blake wrote:
> >> Option 1: This patch (all callers have to worry about NULL buffers,
> >> but checking for output is a simple pointer check).
> >>
> >> Option 2: Guarantee that outbuf/errbuf are allocated, even if to
> >> the empty string.  Caller always has to free the result, and
> >> empty output check requires checking if *outbuf=='\0'.
> >>
> >> Personally, I prefer option 2.  Thoughts?
> >
> > 2 seems safer.
> >
> 
> I vote for the second version too.

  me too :-) ACK on 2/2

Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel@xxxxxxxxxxxx  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/

--
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]