Skip to contentSkip to conversation

remus: libcheckpoint - initialize unused callback fields to NULL

PATCH In review [email protected] 2 participants 2 messages Feb 10, 2012 – Feb 20, 2012 Arm/actions semi architecture

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 remus: libcheckpoint - initialize unused callback fields to NULL

# HG changeset patch
# User Shriram Rajagopalan <[email protected]>
# 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.

tools/python/xen/lowlevel/checkpoint/checkpoint.c +1 -0
@@ -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;