Re: [Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2017-01-04 Thread Anthony PERARD
On Thu, Dec 22, 2016 at 10:47:35AM +, Wei Liu wrote: > On Thu, Dec 22, 2016 at 05:53:07PM +0800, Zhang Chen wrote: > > diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c > > index ad22ad4..123a6bf 100644 > > --- a/tools/libxl/libxl_qmp.c > > +++ b/tools/libxl/libxl_qmp.c > > @@ -427

Re: [Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2016-12-25 Thread Zhang Chen
On 12/23/2016 07:44 PM, Wei Liu wrote: On Fri, Dec 23, 2016 at 11:16:58AM +0800, Zhang Chen wrote: [...] + Here, as I understand it, read can return incomplete message. For example, when the buffer is not big enough. And the inner loop in original code handles that by checking if there is "\

Re: [Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2016-12-23 Thread Wei Liu
On Fri, Dec 23, 2016 at 11:16:58AM +0800, Zhang Chen wrote: [...] > >>+ > >Here, as I understand it, read can return incomplete message. For > >example, when the buffer is not big enough. > > > >And the inner loop in original code handles that by checking if there is > >"\r\n". If not, it will read

Re: [Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2016-12-22 Thread Zhang Chen
On 12/22/2016 06:47 PM, Wei Liu wrote: Also CC Anthony, who wrote the original code. On Thu, Dec 22, 2016 at 05:53:07PM +0800, Zhang Chen wrote: Make select loop more readable. The behaviour of this function is changed. The changes are not necessarily wrong, but we need to have clear commit

Re: [Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2016-12-22 Thread Wei Liu
Also CC Anthony, who wrote the original code. On Thu, Dec 22, 2016 at 05:53:07PM +0800, Zhang Chen wrote: > Make select loop more readable. The behaviour of this function is changed. The changes are not necessarily wrong, but we need to have clear commit message for why the change of behaviour is

[Xen-devel] [PATCH] libxl/libxl_qmp.c: Fix code style in qmp_next()

2016-12-22 Thread Zhang Chen
Make select loop more readable. Signed-off-by: Zhang Chen --- tools/libxl/libxl_qmp.c | 123 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index ad22ad4..123a6bf 100644 --- a/tool