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

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

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

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