From mboxrd@z Thu Jan 1 00:00:00 1970 From: rshriram@cs.ubc.ca Subject: [PATCH] remus: libcheckpoint - initialize unused callback fields to NULL Date: Thu, 09 Feb 2012 17:45:24 -0800 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: ian.jackson@citrix.com List-Id: xen-devel@lists.xenproject.org # HG changeset patch # User Shriram Rajagopalan # 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 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;