Re: [libvirt] [PATCH]: Fixed minor bugs in display and added OOM checks.

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

 



On Mon, Sep 07, 2009 at 10:59:10AM +0200, Pritesh Kothari wrote:
> Hi All,
> 
> There was a minor bug in selecting the graphics type. if the graphics type was 
> desktop it was assumed that display is set for it, and thus crashed on strdup,
> so now checking if display is present before setting it.
> 
> The second bug was while setting the 3d acceleration parameter, VIR_ALLOC()
> returns 0 or greater if success and not the other way round.
> 
> Lastly added OOM checks in few places which were missed earlier.

  Okay applied thanks !
I would concur with Chris, I think the current practice in most
of libvirt code when there is a complex routine is to handle
OOM with a goto to an error label. This allows to limit the level
of cascading. This is stylistic, but affects readability, and
hence maintainability :-)

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]