From: Ian Campbell Subject: Re: [PATCH] opw: libxl: use macro GCNEW in libxl_qmp.c Date: Mon, 11 Nov 2013 12:23:23 +0000 Message-ID: <1384172603.8909.53.camel@kazak.uk.xensource.com> References: <1384165674-25834-1-git-send-email-kelleynnn@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1384165674-25834-1-git-send-email-kelleynnn@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Kelley Nielsen Cc: anthony.perard@citrix.com, xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org On Mon, 2013-11-11 at 02:27 -0800, Kelley Nielsen wrote: > The new coding style uses the convenience macro GCNEW as declared in > libxl_internal.h. Substitute an invocation of this macro for its > body at the one place it occurs in libxl_qmp.c. > > Signed-off-by: Kelley Nielsen > Suggested-by: Anthony PERARD acked + applied. thanks. > --- > tools/libxl/libxl_qmp.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c > index 8d3215c..359b7c7 100644 > --- a/tools/libxl/libxl_qmp.c > +++ b/tools/libxl/libxl_qmp.c > @@ -639,7 +639,7 @@ static void qmp_parameters_common_add(libxl__gc *gc, > *param = libxl__json_object_alloc(gc, JSON_MAP); > } > > - arg = libxl__zalloc(gc, sizeof(*arg)); > + GCNEW(arg); > > arg->map_key = libxl__strdup(gc, name); > arg->obj = obj;