Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MiC7S-0006uR-4K for qemu-devel@nongnu.org; Mon, 31 Aug 2009 15:00:46 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MiC7N-0006sG-Bm for qemu-devel@nongnu.org; Mon, 31 Aug 2009 15:00:45 -0400 Received: from [199.232.76.173] (port=37168 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MiC7N-0006sB-76 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 15:00:41 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34209) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MiC7M-0000Py-O2 for qemu-devel@nongnu.org; Mon, 31 Aug 2009 15:00:41 -0400 Date: Mon, 31 Aug 2009 16:00:20 -0300 From: Luiz Capitulino Subject: Re: [Qemu-devel] [PATCH 3/3] savevm: Convert loadvm handlers list to LIST Message-ID: <20090831160020.3799813c@doriath> In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org On Fri, 28 Aug 2009 22:31:57 +0200 Juan Quintela wrote: > > Signed-off-by: Juan Quintela > --- > savevm.c | 20 +++++++++++--------- > 1 files changed, 11 insertions(+), 9 deletions(-) > > diff --git a/savevm.c b/savevm.c > index baef277..9836c60 100644 > --- a/savevm.c > +++ b/savevm.c > @@ -1260,10 +1260,10 @@ static SaveStateEntry *find_se(const char *idstr, int instance_id) > } > > typedef struct LoadStateEntry { > + LIST_ENTRY(LoadStateEntry) entry; > SaveStateEntry *se; > int section_id; > int version_id; > - struct LoadStateEntry *next; > } LoadStateEntry; > > static int qemu_loadvm_state_v2(QEMUFile *f) > @@ -1309,7 +1309,8 @@ static int qemu_loadvm_state_v2(QEMUFile *f) > > int qemu_loadvm_state(QEMUFile *f) > { > - LoadStateEntry *first_le = NULL; > + LIST_HEAD(, LoadStateEntry) loadvm_handlers; You're missing the initialization here, spot this while testing staging.