diff options
author | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-01-13 16:54:11 +0000 |
---|---|---|
committer | Ian Jackson <ian.jackson@eu.citrix.com> | 2012-01-13 16:54:11 +0000 |
commit | 50c5cd458d3afe161f634bab1127508ad3f9afdc (patch) | |
tree | 4deef0616d7234280288a5103cf7e7eb44ad537f /tools/libxl/libxl_qmp.c | |
parent | a474119259358e366438b744a7379a7887d991e3 (diff) | |
download | xen-50c5cd458d3afe161f634bab1127508ad3f9afdc.tar.gz xen-50c5cd458d3afe161f634bab1127508ad3f9afdc.tar.bz2 xen-50c5cd458d3afe161f634bab1127508ad3f9afdc.zip |
libxl: make LIBXL_INIT_GC a statement, not an initialiser
Previously LIBXL_INIT_GC was an initialiser, which you were expected
to use like this:
libxl__gc gc = LIBXL_INIT_GC(ctx);
But we are going to want to put things in the gc which are to be
initialised using other macros. That means that LIBXL_INIT_GC has to
become a statement too. So instead, we make it so that it's used like this:
libxl_gc gc;
LIBXL_INIT_GC(gc,ctx);
In fact there are only a couple of callers now,
including GC_INIT which uses this trick:
libxl_gc gc[1];
LIBXL_INIT_GC(gc[0],ctx);
Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
Committed-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
Diffstat (limited to 'tools/libxl/libxl_qmp.c')
-rw-r--r-- | tools/libxl/libxl_qmp.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/libxl/libxl_qmp.c b/tools/libxl/libxl_qmp.c index 1777e44ea4..3dfa43a366 100644 --- a/tools/libxl/libxl_qmp.c +++ b/tools/libxl/libxl_qmp.c @@ -513,7 +513,7 @@ static int qmp_send(libxl__qmp_handler *qmp, { char *buf = NULL; int rc = -1; - libxl__gc gc = LIBXL_INIT_GC(qmp->ctx); + libxl__gc gc; LIBXL_INIT_GC(gc,qmp->ctx); buf = qmp_send_prepare(&gc, qmp, cmd, args, callback, opaque, context); |