Fwd: [Libvir] [PATCH] Useless statement in openvzGetVPSInfo
Daniel Veillard
veillard at redhat.com
Thu Feb 21 18:44:02 UTC 2008
On Thu, Feb 21, 2008 at 09:38:21PM +0300, Anton Protopopov wrote:
>
> Oops, forgot the list...
> ---------- Forwarded message ----------
> From: Anton Protopopov <[1]aspsk2 at gmail.com>
> Date: 21.02.2008 21:25
> Subject: Re: [Libvir] [PATCH] Useless statement in openvzGetVPSInfo
> To: [2]veillard at redhat.com
> I think, that if
> pnext = &vm;
> and
> *pnext = calloc(...);
> then
> vm = calloc(...);
> Isn't it?
>
> 2008/2/21, Daniel Veillard <[3]veillard at redhat.com>:
>
> On Thu, Feb 21, 2008 at 08:59:01PM +0300, Anton Protopopov wrote:
> >
> > Hi,
> > the patch is now in attachement..
> > I think, that the statement
> > if (!vm)
> > vm = *pnext;
> > will never be executed: in the first pass, we have already
> check this
> > a few lines before; in next passes, vm remains the same...
> > Anton
> Hum, that doesn't match what I see. vm is initialized to NULL on
> entry
> and no changed before the loop, so on first iteration of the loop
> vm is
> set using that code.
> I don't understand the logic of your patch,
Well clearly I didn't understood the logic of the function :-)
Maybe what's needed is a bit more than just removal to that dead code,
Daniel
--
Red Hat Virtualization group http://redhat.com/virtualization/
Daniel Veillard | virtualization library http://libvirt.org/
veillard at redhat.com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
More information about the libvir-list
mailing list