libxl: use macro GCNEW in libxl_qmp.c
authorKelley Nielsen <kelleynnn@gmail.com>
Mon, 11 Nov 2013 10:27:54 +0000 (02:27 -0800)
committerIan Campbell <ian.campbell@citrix.com>
Mon, 11 Nov 2013 12:16:50 +0000 (12:16 +0000)
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 <anthony.perard@citrix.com>
Signed-off-by: Kelley Nielsen <kelleynnn@gmail.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/libxl/libxl_qmp.c

index 4af7db63d3529fb05d907dd4c20c22b89918308f..db4012657435a0fac3e619acccb337449d7dd79e 100644 (file)
@@ -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;