rshriram@cs.ubc.ca
2012-Feb-10 01:45 UTC
[PATCH] remus: libcheckpoint - initialize unused callback fields to NULL
# HG changeset patch # User Shriram Rajagopalan <rshriram@cs.ubc.ca> # Date 1328838305 28800 # Node ID ae36ea00a09cebdc5a0e08cb28d877dcfc077485 # Parent 7cbe8d029c59d5ff44bafe8065fef07b6cd0126b remus: libcheckpoint - initialize unused callback fields to NULL Add a memset to the save_callbacks struct instance in libcheckpoint''s initialization code. New additions to the callback struct will not need to add an explicit initialization (to NULL), to maintain compatibility with older xend/remus based invocation of xc_domain_save. Signed-off-by: Shriram Rajagopalan <rshriram@cs.ubc.ca> diff --git a/tools/python/xen/lowlevel/checkpoint/checkpoint.c b/tools/python/xen/lowlevel/checkpoint/checkpoint.c --- a/tools/python/xen/lowlevel/checkpoint/checkpoint.c +++ b/tools/python/xen/lowlevel/checkpoint/checkpoint.c @@ -155,6 +155,7 @@ static PyObject* pycheckpoint_start(PyOb } else self->checkpoint_cb = NULL; + memset(&callbacks, 0, sizeof(callbacks)); callbacks.suspend = suspend_trampoline; callbacks.postcopy = postcopy_trampoline; callbacks.checkpoint = checkpoint_trampoline;
Ian Jackson
2012-Feb-20 18:34 UTC
Re: [PATCH] remus: libcheckpoint - initialize unused callback fields to NULL
rshriram@cs.ubc.ca writes ("[Xen-devel] [PATCH] remus: libcheckpoint - initialize unused callback fields to NULL"):> remus: libcheckpoint - initialize unused callback fields to NULLAcked-by: Ian Jackson <ian.jackson@eu.citrix.com> Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>