]> xenbits.xensource.com Git - people/vhanquez/xen.git/commitdiff
remus: libcheckpoint - initialize unused callback fields to NULL
authorShriram Rajagopalan <rshriram@cs.ubc.ca>
Mon, 20 Feb 2012 18:34:14 +0000 (18:34 +0000)
committerShriram Rajagopalan <rshriram@cs.ubc.ca>
Mon, 20 Feb 2012 18:34:14 +0000 (18:34 +0000)
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>
Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
Committed-by: Ian Jackson <ian.jackson@eu.citrix.com>
tools/python/xen/lowlevel/checkpoint/checkpoint.c

index 6ffb1676fce987faf42406e32b55bbf0ba6ce481..917077818788f2eba9b4e2ce837caa21e89c8bfa 100644 (file)
@@ -155,6 +155,7 @@ static PyObject* pycheckpoint_start(PyObject* obj, PyObject* args) {
   } else
     self->checkpoint_cb = NULL;
 
+  memset(&callbacks, 0, sizeof(callbacks));
   callbacks.suspend = suspend_trampoline;
   callbacks.postcopy = postcopy_trampoline;
   callbacks.checkpoint = checkpoint_trampoline;