[libvirt] [PATCH] openvz: simplify openvzDomainDefineCmd by using virCommandPtr
Guido Günther
agx at sigxcpu.org
Mon May 7 16:15:59 UTC 2012
On Mon, May 07, 2012 at 08:51:50AM -0600, Eric Blake wrote:
> On 05/05/2012 03:30 AM, Guido Günther wrote:
> > ---
> > While working on setting filesystem quotas I came accross this and I
> > figured I'll send this in advance because of the diffstat.
> > Cheers,
> > -- Guido
>
> > + } else {
> > + cmd = openvzDomainDefineCmd(vmdef);
> > + if (cmd == NULL)
> > goto cleanup;
>
> This misses out on the virReportOOMError(); you could just delete this
> if clause, and directly proceed to:
>
> > - }
> >
> > - if (virRun(prog, NULL) < 0) {
> > + if (virCommandRun(cmd, NULL) < 0)
>
> this, which will properly report the OOM in case cmd is NULL.
>
> ACK with that simplification.
Pushed with that change. Thanks,
-- Guido
More information about the libvir-list
mailing list