From: Kelley Nielsen Date: Mon, 11 Nov 2013 10:27:54 +0000 (-0800) Subject: libxl: use macro GCNEW in libxl_qmp.c X-Git-Tag: archive/raspbian/4.8.0-1+rpi1~1^2~6037 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=362c286ddb7ab2a8f189b8d71da1ced7db556383;p=xen.git libxl: use macro GCNEW in libxl_qmp.c 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. Suggested-by: Anthony PERARD Signed-off-by: Kelley Nielsen Acked-by: Ian Campbell --- diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index 4af7db63d3..db40126574 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -632,7 +632,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;