On Wed, 2015-03-18 at 10:15 +0000, Wei Liu wrote:
> On Wed, Mar 18, 2015 at 06:50:35AM +0000, PRAMOD DEVENDRA wrote:
> > From: Pramod Devendra <pramod.deven...@citrix.com>
> > 
> > Signed-off-by: Pramod Devendra <pramod.deven...@citrix.com>
> > CC: Ian Jackson <ian.jack...@eu.citrix.com>
> > CC: Stefano Stabellini <stefano.stabell...@eu.citrix.com>
> > CC: Ian Campbell <ian.campb...@citrix.com>
> > CC: Wei Liu <wei.l...@citrix.com>
> 
> Thanks.
> 
> The patch content looks good.

Actually I think it should use the goto out error handling style, rather
than closing the fd on every single path.

i.e. the tail should be:

 out:
  if (ret == -1 && qmp->qmp_fd > -1) close(qmp->qmp_fd);

  return ret;

and ret should be initialised to -1 at the top, and each return should
be a goto.



_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to