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 <[email protected]> > > > > Signed-off-by: Pramod Devendra <[email protected]> > > CC: Ian Jackson <[email protected]> > > CC: Stefano Stabellini <[email protected]> > > CC: Ian Campbell <[email protected]> > > CC: Wei Liu <[email protected]> > > 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 [email protected] http://lists.xen.org/xen-devel
